Skip to content

Bump to uniffi-rs 0.3.0 #316

@jhugman

Description

@jhugman

This is a tracking issue. Many issues should be created and fixed in their own separate PRs.

Before we do this, we should do a final 0.29.x release.

Here is the changelog for uniffi-rs:

Breaking changes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions