Cargo Features
[dependencies]
uniffi = { version = "0.29.0", default-features = false, features = ["ffi-trace", "build", "bindgen", "cargo-metadata", "cli", "bindgen-tests", "tokio", "scaffolding-ffi-buffer-fns"] }
- default = cargo-metadata
-
The
cargo-metadata
feature is set by default wheneveruniffi
is added without
somewhere in the dependency tree.default-features = false - ffi-trace
-
Printout tracing information on FFI calls. Useful for debugging issues with the bindings code.
Enables ffi-trace of optional uniffi_bindgen and uniffi_core
- build
-
Support for features needed by the
build.rs
script. Enable this in yourbuild-dependencies
.Enables uniffi_build
- bindgen cli?
-
Support for
uniffi_bindgen::generate_bindings
. Enable this feature for youruniffi-bindgen
binaries if you don't need the full CLI.Enables uniffi_bindgen
- cargo-metadata default
-
Enables cargo_metadata ^0.15, cargo-metadata of optional uniffi_bindgen
- cli = bindgen
-
Support for
uniffi_bindgen_main()
. Enable this feature for youruniffi-bindgen
binaries. - bindgen-tests
-
Support for running example/fixture tests for
uniffi-bindgen
. You probably don't need to enable this.Enables bindgen-tests of uniffi_bindgen
- tokio
-
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
- scaffolding-ffi-buffer-fns
-
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