This repository has been archived by the owner on Dec 4, 2023. It is now read-only.
forked from mozilla/uniffi-rs
-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
This file contains 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
Also arrange for mdbook-linkcheck to be used to check the links which should fail CI if broken links are re-added.
A single global callback won't work if there are multiple foreign modules. Instead, input the callback in `poll()`. Added some tests for this in `fixtures/ext-types/proc-macro-lib`. Things worked on Swift and Python for me because that code was based on leaking a pointer and it happened to work if the pointer came from another module. It just halted on Kotlin though and I think the same would happen if I wasn't on CPython and the alternate PointerMangager was used.
This is part of mozilla#1791, which was merged just after the `0.25.0` release was made. We wanted to give that code a bit of time in main before releasing it. However, this part is useful for traits implemented in Rust.
* Kotlin: fixed external types with async functions (mozilla#1798) * Swift: fixed compile error when multiple crates define async functions
A single global callback won't work if there are multiple foreign modules. In `main` we handle this by inputting a callback in `poll()`. In `release-v0.25.x` we can't change `UNIFFI_CONTRACT_VERSION`, so instead we keep the `rust_future_continuation_callback_set` scaffolding function, then have the scaffolding code pass the callback to `rustfutures.rs`. Added some tests for this in `fixtures/ext-types/proc-macro-lib`. Things worked on Swift and Python for me because that code was based on leaking a pointer and it happened to work if the pointer came from another module. It just halted on Kotlin though and I think the same would happen if I wasn't on CPython and the alternate PointerMangager was used.
Instead of replacing `uniffi.toml` with override config entirely, merge the override config into `uniffi.toml`. The merge recursively upserts TOML keys. This strategy seems pretty standard everywhere when it comes to configuration. Merging allows the configuration to be selectively changed, without having to duplicate the entire default configuration. The main use case for this would be to allow "global" configuration across multiple crates in a library. Some configuration options should be the same for all crates in a library, without having to duplicate these options across all crates. Right now I can think of 3 use cases of such configuration: - In Swift generator, `omit_argument_labels`. I'm not entirely sure if anyone is actually using this, but it seems like an option that someone might potentially want to configure for all crates in a library. - In `uniffi-bindgen-go`, `go_mod` configuration key is used to control the prefix for external type imports. Multiple crates in a library using external types share a common prefix when it comes to importing the external types, e.g. `com.example.uniffi.*`. This should configured as a single property for all crates. - External binding generators can use the merge option to inject additional configuration into `custom_types` fixture. This one is a bit sketchy, because external binding generators might want to modify the configuration for specific fixture/example crates in upstream, instead of doing global configuration for all crates. Still, global configuration solves the immediate issue of configuring `custom_types` crate to including `Url` custom type for external bindings.
`fatalError()` just causes a crash, there's no need to throw it.
Add a 3rd party language "Dart".
…ozilla#1817) This brings those language to parity with Python.
- Also make their methods open. - Make the `Pointer` in `FfiObject` optional. - Add a `constructor(noPointer: NoPointer)` to create a FFiObject with no pointer for fakes. - Remove redundant interfaces since they can be implemented, but not used in any way. - Add tests for fakes.
Merge 0.25.1 to main
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.