Skip to content

Commit 69814cd

Browse files
Merge pull request #106 from spinframework/reexports
Re-export some useful items
2 parents 4853e8d + bdcad42 commit 69814cd

File tree

3 files changed

+8
-3
lines changed
  • crates/spin-wasip3-http/src
  • examples
    • wasip3-concurrent-outbound-http-calls/src
    • wasip3-streaming/src

3 files changed

+8
-3
lines changed

crates/spin-wasip3-http/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
#[doc(hidden)]
66
pub use wasip3;
77

8+
pub use wasip3::{
9+
http_compat::{IncomingMessage, Request, Response},
10+
wit_bindgen::{self, spawn},
11+
wit_future, wit_stream,
12+
};
13+
814
use hyperium as http;
915
use std::any::Any;
10-
pub use wasip3::http_compat::{Request, Response};
1116
use wasip3::{
1217
http::types,
1318
http_compat::{

examples/wasip3-concurrent-outbound-http-calls/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async fn handle_concurrent_outbound_http_calls(_req: spin_sdk::http_wasip3::Requ
2626
// Spawn a task to run the application logic and stream the results
2727
// to the client. `spawn` continues to run this future even after the
2828
// function has exited with the return of the Response object.
29-
spin_sdk::http_wasip3::wasip3::wit_bindgen::spawn(
29+
spin_sdk::http_wasip3::spawn(
3030
handle_concurrent_outbound_http_calls_impl(tx)
3131
);
3232

examples/wasip3-streaming/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async fn handle_wasip3_streaming(request: Request) -> impl IntoResponse {
3030

3131
// Use wit_bindgen::spawn to allow the async block to keep running
3232
// after the handler returns.
33-
spin_sdk::http_wasip3::wasip3::wit_bindgen::spawn(async move {
33+
spin_sdk::http_wasip3::spawn(async move {
3434
tx.send("-- INBOUND MESSAGE --\n".into()).await.unwrap();
3535
// Keep processing data from the incoming body stream until it ends...
3636
loop {

0 commit comments

Comments
 (0)