diff --git a/crates/wasip3/Cargo.toml b/crates/wasip3/Cargo.toml index 94027e3..ed471e1 100644 --- a/crates/wasip3/Cargo.toml +++ b/crates/wasip3/Cargo.toml @@ -15,12 +15,13 @@ rust-version.workspace = true all-features = true [features] +async-spawn = ["wit-bindgen/async-spawn"] http-compat = [ "dep:bytes", "dep:http-body", "dep:http", "dep:thiserror", - "wit-bindgen/async-spawn", + "async-spawn", ] [dependencies] diff --git a/crates/wasip3/src/lib.rs b/crates/wasip3/src/lib.rs index ad54b27..2d87e30 100644 --- a/crates/wasip3/src/lib.rs +++ b/crates/wasip3/src/lib.rs @@ -176,6 +176,9 @@ where // Reexport wit-bindgen to downstream users don't have to depend on it. pub use wit_bindgen; +#[cfg(feature = "async-spawn")] +pub use wit_bindgen::spawn; + // Expand the `cli` and `http` modules with `export!` macros for the // command/proxy worlds, but also retain all the contents defined in the // `bindings` module as well.