Cargo Features

UniFFI has no features set by default.

uniffi = { version = "0.28.0", features = ["build", "bindgen", "cli", "bindgen-tests", "tokio", "scaffolding-ffi-buffer-fns"] }

Support for features needed by the script. Enable this in your build-dependencies.

Enables uniffi_build

bindgen cli?

Support for uniffi_bindgen::{generate_bindings, generate_component_scaffolding}. Enable this feature for your uniffi-bindgen binaries if you don't need the full CLI.

Enables uniffi_bindgen

cli = bindgen

Support for uniffi_bindgen_main(). Enable this feature for your uniffi-bindgen binaries.

Enables camino and clap

Affects uniffi::uniffi_bindgen_main


Support for running example/fixture tests for uniffi-bindgen. You probably don't need to enable this.

Enables uniffi_bindgen


Enable support for Tokio's futures. This must still be opted into on a per-function basis using #[uniffi::export(async_runtime = "tokio")].

Enables tokio of uniffi_core


Generate extra scaffolding functions that use FfiBuffer to pass arguments and return values This is needed for the gecko-js bindings.

Enables scaffolding-ffi-buffer-fns of uniffi_core and uniffi_macros