Skip to content

Regression: wasm-unstable-single-threaded required for sync-only wasm32 crates in 0.30 #2828

Closed

Description

@jhugman

In 0.30, any crate using uniffi on wasm32 fails to compile without wasm-unstable-single-threaded, even when it has no async code. In 0.29 the feature was only needed for async wasm32 code.

STR

Take any sync-only uniffi crate (e.g. the arithmetic example) and build it for wasm32 without the feature:

cargo build --target wasm32-unknown-unknown

Expected: compiles (as in 0.29)

Actual:

error[E0277]: `F` cannot be sent between threads safely
  --> uniffi_core-0.30.0/src/ffi/rustfuture/mod.rs:96:42
96 | impl<T, F> UniffiCompatibleFuture<T> for F where F: Future<Output = T> {}
   |                                          ^ `F` cannot be sent between threads safely
note: required by a bound in `rustfuture::UniffiCompatibleFuture`
43 | pub trait UniffiCompatibleFuture<T>: Future<Output = T> + Send {}

Activity

  1. added a commit that references this issue on Feb 24, 2026
    9b4480c
  2. bendk commented on Feb 24, 2026

    @bendk
    Contributor

    Oops, I think I did that one. Can you take a look at the PR and see if makes sense to you?

  3. added a commit that references this issue on Feb 25, 2026
    7308314
  4. added a commit that references this issue on Feb 25, 2026
    cdfffa9
  5. added a commit that references this issue on Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions