Repository navigation
Bump uniffi to 0.30.x - #343
Merged
Merged
Conversation
jhugman
force-pushed
the
jhugman/bump-uniffi-to-0.30.x
branch
from
February 25, 2026 18:00
35e52ea to
a221f6b
Compare
…r to UniffiHandle Pure mechanical rename across TypeScript sources and codegen templates.
Add `CustomTupleError` fixture to demonstrate and test custom types used
as error types. Update `ffi_error_converter_name` in filters.rs to unwrap
`Type::Custom { builtin }` when the builtin is an Enum or Object, so the
correct FfiConverter is used for error handling.
Corresponding to mozilla/uniffi-rs#2658
…ts only) Add a `call_trait_impl` function to the ext-types sub-lib that accepts an `Arc<dyn UniffiOneTrait>` (an external trait from a different crate), and add a TypeScript test that implements `UniffiOneTrait` in TypeScript and passes it to the Rust function via `callTraitImpl`. The feature works without code generation changes because: - `FfiConverterTypeUniffiOneTrait` is a `FfiConverterObjectWithCallbacks` defined in the `uniffi_one_ns` generated module - The vtable for `UniffiOneTrait` is registered there and handles both Rust-backed and TypeScript-backed implementations via the handle map - The `imported_types_sublib` module correctly imports and reuses this converter from `uniffi_one_ns`, so lowering a TypeScript object works transparently across crate boundaries Corresponds to: mozilla/uniffi-rs#2430
jhugman
force-pushed
the
jhugman/bump-uniffi-to-0.30.x
branch
from
February 25, 2026 19:03
a221f6b to
954284f
Compare
- Add #[uniffi::trait_interface] to pub trait Getters in traits.rs - Uncomment Getters interface definition in coverall.udl (as [Trait, WithForeign]) - Uncomment make_rust_getters, test_getters, test_round_trip_through_rust, and test_round_trip_through_foreign namespace functions in the UDL - Add coverall.initialize() call to test_coverall.ts to register the Getters vtable before any foreign-trait calls are made - Add TypeScriptGetters class implementing all Getters methods including the "unexpected-error" case that triggers CALL_UNEXPECTED_ERROR - Add four new tests exercising Rust and TypeScript Getters implementations, round-trip-through-rust, and round-trip-through-foreign paths
Documents new features (uniffi traits for records/enums, external trait objects, custom error types, custom type defaults), the uniffi-rs 0.30.x bump, and breaking renames of UniffiRustArcPtr→UniffiGcObject and UnsafeMutableRawPointer→UniffiHandle. Also fixes the malformed ## header in the Upcoming releases section.
- uniffi-trait `Ord` in objects, - unifff-traits in enums and records. - implementing traits from external crates to callback-interfaces.md
jhugman
force-pushed
the
jhugman/bump-uniffi-to-0.30.x
branch
from
February 25, 2026 20:05
6bb39c6 to
21cf48e
Compare
zzorba
approved these changes
Feb 26, 2026
zzorba
left a comment
Collaborator
There was a problem hiding this comment.
LGTM.
I think the choices you made on handling the toString + compare methods in typescript are very idiomatically reasonable, given the language limitations around non-class types.
This was referenced Feb 27, 2026
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #316 .
This PR takes inspiration from–but supercedes #322, #333 and #338.
CMakeLists.txtbuild to usehermes/main.Found and filed upstream Regression:. Workaround.uniffi_foreign_handlemethod is needed in user code for UDL defined traits. mozilla/uniffi-rs#2829wasm-unstable-single-threadedrequired for sync-only wasm32 crates in 0.30 mozilla/uniffi-rs#2828.Changes in uniffi 0.30 changelog.
UniffiTrait::Ordin typescript bindingsCloses #322
Closes #333
Closes #338