Skip to content

Conversation

@Larkooo
Copy link

@Larkooo Larkooo commented Oct 24, 2025

No description provided.

Major changes:
- Update workspace dependencies to UniFFI 0.30.0
- Replace uniffi_bindgen::backend with uniffi_bindgen::interface
- Replace FfiType::RustArcPtr with FfiType::Handle (u64)
- Fix toml::value::Value type compatibility
- Update templates: takes_self() -> self_type().is_some()
- Update C++ type mapping for Handle (void* -> uint64_t)

Remaining work:
- Fix Method construction (no more MethodMetadata.into())
- Handle new UniffiTrait::Ord variant
- Fix Literal type mismatches
- Update C++ includes (RustArcPtr.h)
- Regenerate fixtures for new trait interface
- Run full test suite

See UniFFI 0.30 changelog for breaking changes.
- Updated uniffi, uniffi_bindgen, uniffi_meta dependencies to 0.30.0
- Fixed uniffi_bindgen::backend -> uniffi_bindgen::interface migration
- Replaced FfiType::RustArcPtr with FfiType::Handle (u64 handles)
- Updated Callable.takes_self() -> Callable.self_type().is_some()
- Fixed toml dependency version conflicts
- Added UniffiTrait::Ord pattern match
- Updated FfiFunction construction for private fields
- Fixed DefaultValueMetadata handling in render_literal
- Updated C++ and TypeScript FFI type mappings for u64 handles
- Removed duplicate Handle pattern matches in gen_rust/mod.rs
- Fixed toml::value::Value import path consistency
- Cleaned up unreachable pattern warnings
@Larkooo Larkooo changed the title refactor(uniffi): fully upgrade to 0.30 feat(uniffi): fully upgrade to 0.30 Oct 24, 2025
Literal::Some { .. } => {
// In UniFFI 0.30, Some contains DefaultValueMetadata which we can't easily convert
// For now, use a simple default for the inner type
// TODO: Properly handle DefaultValueMetadata
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... this looks somewhat problematic, is there no way to maintain something closer to the previous behavior?

@jhugman
Copy link
Owner

jhugman commented Oct 29, 2025

@Larkooo Wow, thank you so much. I was/am rather dreading this upgrade.

Is there anything you need from me while you chug through this? I have enabled this PR to run on CI in the mean time.

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.

3 participants