uniffi-rs
uniffi-rs copied to clipboard
`error: future cannot be sent between threads safely` when trying to build for `wasm32-unknown-unknown`
trafficstars
I'm trying to include a crate successfully built with uiffi-rs for Swift for wasm. I created a new crate called crate-networking-wasm and referenced the base crate_networking. When running wasm-pack build in the crate-networking-wasm I got this error:
error: future cannot be sent between threads safely
--> /path-to-repo/lib/crate_networking/src/content.rs:17:1
|
17 | #[export(async_runtime = "tokio")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
|
Any pointers?
Related:
- https://github.com/mozilla/uniffi-rs/issues/1622
- https://github.com/mozilla/uniffi-rs/issues/2225