unstale

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 init

@unstale/cli 0.3.0 on npm

uniffi 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.

    0.32.0release notes

  • The method was removed and replaced by the GlobalConfig struct.

    0.32.0release notes

  • 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.

    0.32.0release notes

  • The flag now expects a global config file; old-style flat uniffi.toml overrides produce a warning and are ignored.

    0.32.0release notes

  • The method now takes a MetadataCommand instance and CargoMetadataOptions instead of a no_deps flag.

    0.32.0release notes

  • Ruby enum constructors now require named parameters.

    0.32.0release notes

  • The experimental pipeline bindgen code was reworked, requiring external binding generators that use it to be reworked.

    0.32.0release notes

  • [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.

    0.32.0release notes

  • A new struct manages configuration and replaces BindgenPathsLayer::get_config().

    0.32.0release notes

Deprecations 1

  • The with_foreign flag is deprecated in favor of rust, foreign.

    0.32.0release notes

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.

    0.32.0release notes

  • Custom Types can have docstrings in some languages.

    0.32.0release notes

  • HashSet can now be used with proc-macros.

    0.32.0release notes

  • derive(uniffi::Enum) now allows literal number suffixes.

    0.32.0release notes

  • This configuration option lets specific records remain mutable when generate_immutable_records is enabled in Kotlin and Swift.

    0.32.0release notes

  • The proc-macro name attribute can rename record fields.

    0.32.0release notes

  • Ruby now supports async.

    0.32.0release notes

  • Standard Rust traits are exposed for generated Ruby code.

    0.32.0release notes

  • Ruby now supports sync foreign traits.

    0.32.0release notes

  • Foreign code can transfer &[u8] / [ByRef] bytes to Rust without copying through RustBuffer; support excludes Ruby and async functions.

    0.32.0release notes

  • Traits can be exported for foreign-only implementations; #[uniffi::export(rust, foreign)] supports both Rust and foreign implementations.

    0.32.0release notes

  • Items can be excluded from generated bindings using uniffi.toml.

    0.32.0release notes

  • Kotlin objects expose a property that returns true if the Rust reference no longer exists.

    0.32.0release notes

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.

    0.32.0release notes

Tooling 2

  • Recursive enum and record cycles are detected and bindings are generated with indirect in Swift and forward references in Python.

    0.32.0release notes

  • UniFfiTag is exempt from clippy::exhaustive_structs so downstream projects may depend on it.

    0.32.0release notes

Fixes and other changes 5

  • Generated Kotlin code no longer triggers compiler warnings.

    0.32.2release notes

  • Fixed checksum failure on aarch64 for Kotlin.

    0.32.1release notes

  • Fixed compile errors when exporting ambiguous method names.

    0.32.0release notes

  • Fixed a bug that sometimes prevented renaming items inside a submodule.

    0.32.0release notes

  • Code generation now works correctly for all kinds of enums and custom types.

    0.32.0release notes