diff --git a/crates/spin-wasip3-http/src/lib.rs b/crates/spin-wasip3-http/src/lib.rs index 6be390c..2719611 100644 --- a/crates/spin-wasip3-http/src/lib.rs +++ b/crates/spin-wasip3-http/src/lib.rs @@ -5,9 +5,14 @@ #[doc(hidden)] pub use wasip3; +pub use wasip3::{ + http_compat::{IncomingMessage, Request, Response}, + wit_bindgen::{self, spawn}, + wit_future, wit_stream, +}; + use hyperium as http; use std::any::Any; -pub use wasip3::http_compat::{Request, Response}; use wasip3::{ http::types, http_compat::{ diff --git a/examples/wasip3-concurrent-outbound-http-calls/src/lib.rs b/examples/wasip3-concurrent-outbound-http-calls/src/lib.rs index 16f0f97..13f566f 100644 --- a/examples/wasip3-concurrent-outbound-http-calls/src/lib.rs +++ b/examples/wasip3-concurrent-outbound-http-calls/src/lib.rs @@ -26,7 +26,7 @@ async fn handle_concurrent_outbound_http_calls(_req: spin_sdk::http_wasip3::Requ // Spawn a task to run the application logic and stream the results // to the client. `spawn` continues to run this future even after the // function has exited with the return of the Response object. - spin_sdk::http_wasip3::wasip3::wit_bindgen::spawn( + spin_sdk::http_wasip3::spawn( handle_concurrent_outbound_http_calls_impl(tx) ); diff --git a/examples/wasip3-streaming/src/lib.rs b/examples/wasip3-streaming/src/lib.rs index a9afa02..dfa29b2 100644 --- a/examples/wasip3-streaming/src/lib.rs +++ b/examples/wasip3-streaming/src/lib.rs @@ -30,7 +30,7 @@ async fn handle_wasip3_streaming(request: Request) -> impl IntoResponse { // Use wit_bindgen::spawn to allow the async block to keep running // after the handler returns. - spin_sdk::http_wasip3::wasip3::wit_bindgen::spawn(async move { + spin_sdk::http_wasip3::spawn(async move { tx.send("-- INBOUND MESSAGE --\n".into()).await.unwrap(); // Keep processing data from the incoming body stream until it ends... loop {