uniffi-rs
uniffi-rs copied to clipboard
a multi-language bindings generator for rust
~~This PR is a two-parter:~~ The first 2 commits essentially implement what we discussed in #1658: Struct constructors use named parameters in the foreign language. This is enforced for Ruby...
I'm working with a [`#[derive(uniffi::Error)]` enum that's quite large](https://github.com/liveview-native/phoenix-channels-client/blob/416a3e52606a70775fd4cf0d349c6af7b0fba974/src/ffi/io/error.rs#L4-L221). It was mentioned in the matrix chat that these docstrings end up in the staticlib binary and bloat the size so...
This fixes #1976, which tracks Rust panics with values that overflow the `RustBuffer` fields. Note that `capacity` can overflow even if the rust buffer size is < `i32::MAX` because of...
This is a proposal to help fix #1976. We use `Vec.shrink_to` to impose a ceiling on vector capacity that is in line with the max `RustBuffer::from_vec` can handle.
Hello! I've been poking around at UniFFI for a few days and I really like what I see: the ability to automatically generate high-level APIs is amazing. However, I think...
Hi, trying to convert my bindings to async I noticed that async constructors and traits aren't supported. Is possible to add support to async constructors and traits or is a...
One thing that I've found super helpful when working with enums with associated data is being able to define getters and predicates on them. Here's an example inspired by https://github.com/mozilla/application-services/pull/5346#discussion_r1095272665:...
The `#[uniffi::constructor]` macro *can* be attached to a function on a `uniffi::Recrod` struct's function returning `Self` today, however, it does not generate and constructor in the generated Swift code. It...
This PR is the Swift version of this [Kotlin PR](https://github.com/mozilla/uniffi-rs/pull/1815), as it makes the concrete type open. Making the concrete types `open` allows them to be extended to write mocks,...
We've discussed this is various issues, most recently #1865. I think it's time that we have an ADR and discuss the question directly and by itself. There's a lot more...