diff --git a/crates/guest-rust/Cargo.toml b/crates/guest-rust/Cargo.toml index f687809b7..0906b04c5 100644 --- a/crates/guest-rust/Cargo.toml +++ b/crates/guest-rust/Cargo.toml @@ -38,7 +38,7 @@ default = ["macros", "realloc", "async", "std", "bitflags", "macro-string"] macros = ["dep:wit-bindgen-rust-macro"] realloc = [] std = [] -async = ["wit-bindgen-rust-macro?/async"] +async = [] bitflags = ["dep:bitflags"] async-spawn = ['async', 'dep:futures', 'std'] futures-stream = ['async', 'dep:futures'] diff --git a/crates/guest-rust/macro/Cargo.toml b/crates/guest-rust/macro/Cargo.toml index 4c3a5fb8a..f03aee942 100644 --- a/crates/guest-rust/macro/Cargo.toml +++ b/crates/guest-rust/macro/Cargo.toml @@ -27,5 +27,4 @@ macro-string = { workspace = true, optional = true } [features] default = ["macro-string"] -async = [] macro-string = ["dep:macro-string"] diff --git a/crates/guest-rust/macro/src/lib.rs b/crates/guest-rust/macro/src/lib.rs index 720163db7..e5ae0b0ef 100644 --- a/crates/guest-rust/macro/src/lib.rs +++ b/crates/guest-rust/macro/src/lib.rs @@ -163,12 +163,6 @@ impl Parse for Config { return Err(Error::new(span, "cannot specify second async config")); } async_configured = true; - if val.any_enabled() && !cfg!(feature = "async") { - return Err(Error::new( - span, - "must enable `async` feature to enable async imports and/or exports", - )); - } opts.async_ = val; } Opt::EnableMethodChaining(enable) => {