Skip to content

chore(deps): update rust crate uniffi_bindgen to 0.31.0 - autoclosed#4

Closed
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/uniffi_bindgen-0.x
Closed

chore(deps): update rust crate uniffi_bindgen to 0.31.0 - autoclosed#4
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/uniffi_bindgen-0.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Feb 23, 2026

This PR contains the following updates:

Package Type Update Change
uniffi_bindgen (source) build-dependencies minor 0.29.40.31.0

Release Notes

mozilla/uniffi-rs (uniffi_bindgen)

v0.31.0

Compare Source

⚠️ Breaking Changes ⚠️
  • The uniffi-bindgen command no longer accepts the --lib-file argument. Instead, pass the
    library directly without a UDL file.
  • Removed the [Swift|Kotlin|Python|Ruby]BindingGenerator types. Use uniffi::generate instead
    to generate these bindings.
  • Reworked the experimental pipeline bindgen code. Any external binding generators using this will
    need to be reworked as well. See #​2787 for
    examples of how this can be done.
What's Deprecated?
  • BindgenCrateConfigSupplier. Use the new BindgenPaths type instead.
What's New?
  • Added the uniffi::generate function. This implements the uniffi-bindgen generate command and
    allows it to be run programmatically.
  • The --library argument of uniffi-bindgen is deprecated and no longer has an effect.
    uniffi-bindgen will now auto-detect when the source path is a library rather than a UDL file.
  • All builtin bindings support renaming almost all of the interface (types, args, items, variants, etc) via TOML definitions -
    see the docs.
    (#​2715)
  • Support for methods on records and enums
    (#​2706, #​2724, #​2739).
  • Added the BindgenPaths type, which is the new way to find UDL and TOML data.
  • Enum variants can now be renamed with the proc-macro name = "NewVariantName" attribute (#​2783)
  • It's now possible to build a uniffi-bindgen that doesn't depend on cargo-metadata (#​2746)
  • MSR is now 1.87, our CI runs against 1.90.
What's Fixed
  • Kotlin: Rust enums with nested payload types are generated using the inner type’s fully qualified
    name, avoiding naming conflicts and allowing payloads to reuse the variant name (#​2698).
  • Kotlin: Enums and errors now support exporting trait methods (Display, Debug, Eq, Hash, Ord) via toString(),
    equals(), hashCode(), and compareTo() implementations. Flat enums only support exporting Display. (#​2700).
  • Kotlin: Initialization functions now have a stable ordering (#​2718)
  • Prevented a potential segfault when completing foreign futures (#​2733)
  • Swift: exporting Eq, Cmp etc would generate invalid code if the Rust name had unusual captialization (#​2707).
  • Fix an issue when an impl block has only async constructors (#​2778)
  • Fix issues parsing some #[doc(...)] attributes in exported blocks (#​2777)
  • Fix extracting metadata from multi-arch binary files (#​2750)
  • Python: improve generated code for __eq__ (#​2741)
⚠️ Breaking Changes ⚠️
  • Method checksums no longer include the self type. This shouldn't affect normal use. However
    checksum comparisons will fail if bindings built with 0.30.x and the Rust code is built with
    0.31.x, or vice-versa.
⚠️ Breaking Changes for external bindings authors ⚠️
  • The module_path field now stores full module paths rather than crate names only.
    External bindings authors will probably need to make some minor changes to work with this.
    See #​2695/ for examples.

All changes in v0.31.0.

v0.30.0

Compare Source

⚠️ Breaking Changes ⚠️
  • UDL-based trait interfaces must now be wrapped with the #[uniffi::trait_interface] attribute.
  • Python: Trait interface implementations must now inherit from the trait base class.
    This will look like class PyTraitName(RustTraitName):
What's new?
  • All user-defined types can now be renamed with the proc-macro name = "NewName" attribute (like already supported for methods and constructors) (#​2661)
  • Enums and Records support exporting uniffi traits (ie, Display, Hash, Eq etc) (#​2555)
  • Support for exporting the Ord trait, allowing objects to be ordered by Rust (#​2583).
  • #[uniffi(default)] literals are now optional - eg, #[uniffi(default)] and #[uniffi(default = 0)] are equivalent.
    Similarly for args; #[uniffi::export(default(arg_name))].
    When no literal is specifed, named types (objects, records, etc) can be used as long as they have suitable default values.
    (#​2543).
    Custom types too (#​2603)
  • Custom enum and object types can be used as error type (#​2658)
  • Objects can implement external traits (#​2430)
  • Fix for external errors when error only used externally (#​2641)
  • Kotlin:
    • Switch to JNA direct mapping (#​2229)
    • Support throwing external error (#​2629)
    • The NoPointer placeholder object used to create fake interface instances has been renamed to NoHandle
  • Python:
    • Improved how default values are handled in function signatures etc and more canonical use of Python dataclasses, all towards making mypy happier (#​2552)
    • Methods now have typing annotations for return values (#​2625)
    • Fix relative imports (#​2657)
    • Fix shadowing param names with internal variables in Python (#​2628/#​2645)
    • Don't allow objects to be passed as arguments when traits are expected (#​2649)
  • Swift:
    • All object protocol conformances are public (#​2671)
    • Initialization functions now have a stable ordering when using external types.
      This makes the generated source files deterministic.
⚠️ Breaking Changes for external bindings authors ⚠️
  • uniffi_bindgen::backend has been removed.
  • #[uniffi(default)] changes how defaults are represented.
  • FfiType::RustArcPtr has been removed and the FFI type for objects/interfaces is now a u64.
    Bindings authors will need to update their code to reflect this:
    • Lowering/lifting now uses u64 values
    • The free function inputs a u64 handle rather than a raw pointer
    • The clone function inputs and returns a u64 handle rather than a raw pointer
  • Enums and Records can have methods, so the Method now carries self_type instead of the object name.
    In the templates, for Callable.takes_self() is replaced with Callable.self_type().
  • Trait / Callback interface changes
    • VTable fields are now: free, clone, followed by a field for each interface method.
      Note That free is now at the start of the vtable rather than the end.
    • Trait interface changes:
      • Foreign handles must always have the lowest bit set
      • Both Rust and foreign handles can now be passed across the FFI.
        When Lifting/lowering trait interface handles, check if the handle was generated from Rust or the foreign side.
    • See https://github.com/mozilla/uniffi-rs/pulls/2586 examples of how the builtin bindings here changed.

All changes in v0.30.0.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title chore(deps): update rust crate uniffi_bindgen to 0.31.0 chore(deps): update rust crate uniffi_bindgen to 0.31.0 - autoclosed Feb 23, 2026
@renovate renovate bot closed this Feb 23, 2026
@renovate renovate bot deleted the renovate/uniffi_bindgen-0.x branch February 23, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants