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

@Larkooo
Copy link
Author

Larkooo commented Nov 3, 2025

Nope all good, will try to get this ready.

- Fix callback functions to return correct types (uint64_t for clone callbacks)
- Fix lambda return type declarations to match callback signatures
- Add proper return value handling when rsLambda is null
- Fix free functions to pass uint64_t directly instead of void* cast
- Add makeCallbackFunction support for ForeignFuture callbacks

Fixes three UniFFI 0.30 C++ codegen issues:
1. Callback return type mismatch (void vs uint64_t)
2. Missing ForeignFutureDroppedCallback namespace
3. Free function wrong signature (void* vs uint64_t)
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