We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f73ffd commit edb7a0fCopy full SHA for edb7a0f
bindings/matrix-sdk-ffi-macros/src/lib.rs
@@ -51,7 +51,12 @@ pub fn export(attr: TokenStream, item: TokenStream) -> TokenStream {
51
52
let res = match syn::parse(item) {
53
Ok(item) => match has_async_fn(item) {
54
- true => quote! { #[uniffi::export(async_runtime = "tokio", #attr2)] },
+ true => {
55
+ quote! {
56
+ #[cfg_attr(target_family = "wasm", uniffi::export(#attr2))]
57
+ #[cfg_attr(not(target_family = "wasm"), uniffi::export(async_runtime = "tokio", #attr2))]
58
+ }
59
60
false => quote! { #[uniffi::export(#attr2)] },
61
},
62
Err(e) => e.into_compile_error(),
0 commit comments