23 APR 2026

rahulmnavneeth

reference — ffi

homedocs

Crate: uify-ffi. Produces libuify.so / .dylib / .dll and a generated C header at include/uify.h.

ABI versioning

Every build exports uify_abi_version(). Consumers check at load time and refuse to link if the returned value is newer than they compile against.

Bindings

LanguageToolArtifact
Pythonpyo3bindings/python/ wheel
SwiftUniFFIbindings/swift/ XCFramework
KotlinUniFFIbindings/kotlin/ AAR
JS / WASMwasm-bindgenbindings/wasm/ npm package
Nodenapi-rsbindings/node/ npm package

Each binding is a separate crate under bindings/. The core Rust crates do not depend on any binding.

Ownership

All resources use create / destroy pairs. Rust never panics across the FFI boundary; errors are returned as integer codes with a thread-local last-error string.