cargo / uniffi
uniffi
What changed in uniffi 0.32, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-12.
9 breaking1 deprecations13 new APIs and options1 behavior and defaults2 tooling5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inituniffi 0.3231 changes
Breaking changes 9
Kotlin and Python now fail to generate bindings when a type has an async primary constructor; exclude the constructor to get similar behavior.
The method was removed and replaced by the GlobalConfig struct.
UDL arguments now map to &[u8] instead of &Vec<u8>; Rust implementations taking &Vec<u8> must change, and Kotlin callers must pass a direct ByteBuffer rather than ByteArray.
The flag now expects a global config file; old-style flat uniffi.toml overrides produce a warning and are ignored.
The method now takes a MetadataCommand instance and CargoMetadataOptions instead of a no_deps flag.
Ruby enum constructors now require named parameters.
The experimental pipeline bindgen code was reworked, requiring external binding generators that use it to be reworked.
[ByRef] bytes now cross the FFI as a pointer-and-length ForeignBytes value instead of RustBuffer; external bindings must lower the foreign-language buffer for the call without copying.
A new struct manages configuration and replaces BindgenPathsLayer::get_config().
Deprecations 1
The with_foreign flag is deprecated in favor of rust, foreign.
New APIs and options 13
The tokio async_runtime option can now be applied to trait exports, wrapping each method's FFI scaffolding future in async_compat::Compat.
Custom Types can have docstrings in some languages.
HashSet can now be used with proc-macros.
derive(uniffi::Enum) now allows literal number suffixes.
This configuration option lets specific records remain mutable when generate_immutable_records is enabled in Kotlin and Swift.
The proc-macro name attribute can rename record fields.
Ruby now supports async.
Standard Rust traits are exposed for generated Ruby code.
Ruby now supports sync foreign traits.
Foreign code can transfer &[u8] / [ByRef] bytes to Rust without copying through RustBuffer; support excludes Ruby and async functions.
Traits can be exported for foreign-only implementations; #[uniffi::export(rust, foreign)] supports both Rust and foreign implementations.
Items can be excluded from generated bindings using uniffi.toml.
Kotlin objects expose a property that returns true if the Rust reference no longer exists.
Behavior and default changes 1
Box<T> automatically implements FFI traits when T does, allowing direct use in enum variants and function parameters without NewType wrappers.
Tooling 2
Recursive enum and record cycles are detected and bindings are generated with indirect in Swift and forward references in Python.
UniFfiTag is exempt from clippy::exhaustive_structs so downstream projects may depend on it.
Fixes and other changes 5
Generated Kotlin code no longer triggers compiler warnings.
Fixed checksum failure on aarch64 for Kotlin.
Fixed compile errors when exporting ambiguous method names.
Fixed a bug that sometimes prevented renaming items inside a submodule.
Code generation now works correctly for all kinds of enums and custom types.