- Feb 11, 2025
-
- Feb 05, 2025
-
-
Beatriz Rizental authored
-
- Apr 03, 2024
-
-
Mark Hammond authored
-
Mark Hammond authored
-
Quentin Perez authored
-
Mark Hammond authored
#2048 regressed swift constructors which throw. Fixes #2058
- Mar 26, 2024
-
-
bendk authored
Release v0.27.x
-
Ben Dean-Kawamura authored
-
bendk authored
Add async constructor support.
-
bendk authored
Swift: Make it possible to mark value types as `Sendable` with `sendable_value_types` config
-
- Mar 25, 2024
-
-
Alexander Cyon authored
Swift only: Make it possible to mark value types as Sendable, by use of new config 'sendable_value_types' in uniffi.toml.
-
bendk authored
More macro defaults
-
Mark Hammond authored
All constructors can be async. Alternate constructors work in Python, Kotlin and Swift, although only Swift supports primary constructors. Cleans up and removes duplication in the Kotlin and Swift bindings too. Fixes #1919
-
- Mar 24, 2024
-
-
Mark Hammond authored
-
- Mar 23, 2024
-
-
Ben Dean-Kawamura authored
I implemented everything, except enum variants and also jplatte's suggestion of a function-based default. I think those two can be done later, especially since they semi-conflict. When you're parsing it's hard to tell an variant ident from a function ident. I also think function-based defaults might be better for enums anyways, since they would work with associated data. Updated the metadata to add the `SOME` code and make the optional types expect that, rather than reading the literal for ther inner type. I think that makes the code a bit cleaner. Split up the compounds code in Kotlin. Now each type can only parse their literals rather allowing any compound-like literal for any compound type.
-
bendk authored
Blocking task queue without specialized code
-
Ben Dean-Kawamura authored
Added some code to show how you can run blocking Rust code inside a foreign task queue.
-
- Mar 22, 2024
-
-
Salvatore Testa authored
De-couple TargetLanguage from the `generate_external_bindings` calls. This will allow 3rd-party BindingGenerators to use the methods. The `try_format_code` boolean had to be punched through (for now) to keep the API as similar as possible. I think a follow-up action should be to move the boolean to the Config.
-
- Mar 20, 2024
-
-
Alexander Cyon authored
* Increase BUF_SIZE to 16384 (from 4096), allowing large errors (enums) to be used. Add fixture which unit tests fails even for BUF_SIZE of 8198, but works with 16k.
-
bendk authored
Allow defaults for proc-macro function arguments
-
- Mar 19, 2024
-
-
Ben Dean-Kawamura authored
- Renamed FieldDefault to DefaultValue and shared it between the field and argument code. - Added a defaults field to NonExportArgs and ExportFnArgs - Renamed NonExportArgs to ExportedImplFnArgs. I think that's a bit more clear
-
- Mar 18, 2024
-
-
bendk authored
Foreign-implemented async trait methods (#2017)
-
Ben Dean-Kawamura authored
These methods input a completion function that they call when the async function is complete. They return a ForeignFuture struct, which represents the foreign task object and is used to drop/cancel futures. Like Rust, dropping and cancelling are coupled together into one operation. - Added `RustCallStatus` as an `FfiType` variant, since I wanted to use it in the `ForeignFutureResult` structs. In theory, we could define `RustCallStatus` a `FfiType::Struct`, but I didn't want to introduce that change in this PR. - Fixed the result mapping code to work with async functions. Before we were executing the mapping call, then awaiting the result, but we need to do that in the opposite order (`foo.into().await` vs `foo.await.into()`). Also, specify the return type generics for `rust_future_new` so that the Rust can figure out the into() generics.
-
Samy Djemaï authored
-
Martin Mose Hansen authored
-
Mark Hammond authored
-
bendk authored
Split up ScaffoldingBits.params
-
Ben Dean-Kawamura authored
This is a refactor to enable some future work. By tracking the parameter names and types separately we get some extra flexibility, for example iterating over the types.
-
- Mar 14, 2024
-
-
bendk authored
Change RustBuffer length/capacity to `u64` (#1976)
-
Ben Dean-Kawamura authored
-
- Mar 13, 2024
-
-
Mark Hammond authored
These are represented in the CI as enum variants with nameless fields. Part of #1078, although no support for UDL yet.
-
bendk authored
Remove some unnecessary trailing whitespace
-
Blake Griffith authored
-
- Mar 12, 2024
-
-
Mark Hammond authored
Also now generates an error rather then silently ignoring when a discriminant value is an expression or anything else we can't handle.
-
- Mar 11, 2024
-
-
Martin Geisler authored
* Add missing derive feature to serde dependency The code built without this, but that seems to because of an accident since the derive feature is not a default serde feature. I noticed this when trying to make uniffi_build an optional dependency of uniffi_macros — for some reason I don’t understand, this would make `cargo build -p uniffi_macros` fail wtih: error: cannot find derive macro `Deserialize` in this scope --> uniffi_macros/src/util.rs:29:14 | 29 | #[derive(Deserialize)] | ^^^^^^^^^^^ | The error makes sense since the derive feature wasn’t enabled. What does not make sense to me is that the error wasn’t triggered before. * Make `uniffi_build` optional in `uniffi_macros` As far as I can see, the dependency on uniffi_build is not needed for the macros used by regular clients of UniFFI — it is only used to create a convenience macro for the UI tests. I named the new feature “trybuild” after the description of the macro. Please let me know if you have preferences for a better name. The overall goal here is to minimize the number of crates I need to vendor to use UniFFI — I’m hoping to get away with checking in the generated target language sources, so I’m currently focusing on the dependencies in the rest of the code base.
-
Mark Hammond authored
The generated Python code didn't raise an exception after checking all variants. Without the fix the new test fails with: > enum_types.InternalError: Failed to convert arg 'a': not enough bytes remaining in buffer (0 < 4) Also upgrades the test to a unittest.
-
- Mar 08, 2024
-
-
Sammy Khamis authored
-
- Mar 07, 2024
-
-
bendk authored
Merge 0.26.1 to main
-