Skip to content

Commit 9151934

Browse files
Daniel SalinasDaniel Salinas
authored andcommitted
Target family=wasm
1 parent e03a033 commit 9151934

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/matrix-sdk-ffi-macros/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ pub fn export(attr: TokenStream, item: TokenStream) -> TokenStream {
5353
Ok(item) => match has_async_fn(item) {
5454
true => {
5555
quote! {
56-
#[cfg_attr(target_arch = "wasm32", uniffi::export(#attr2))]
57-
#[cfg_attr(not(target_arch = "wasm32"), uniffi::export(async_runtime = "tokio", #attr2))]
56+
#[cfg_attr(target_family = "wasm", uniffi::export(#attr2))]
57+
#[cfg_attr(not(target_family = "wasm"), uniffi::export(async_runtime = "tokio", #attr2))]
5858
}
5959
}
6060
false => quote! { #[uniffi::export(#attr2)] },

crates/matrix-sdk-common/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ async-compat.workspace = true
4242
tokio = { workspace = true, features = ["rt", "time", "macros"] }
4343

4444
[target.'cfg(target_family = "wasm")'.dependencies]
45+
futures-executor.workspace = true
4546
futures-util = { workspace = true, features = ["channel"] }
4647
gloo-timers = { workspace = true, features = ["futures"] }
4748
tokio = { workspace = true, features = ["macros"] }

0 commit comments

Comments
 (0)