chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

22
vendor/wasip3/examples/http-proxy.rs vendored Normal file
View File

@@ -0,0 +1,22 @@
use wasip3::http::types::{ErrorCode, Fields, Request, Response};
use wasip3::{wit_bindgen, wit_future, wit_stream};
wasip3::http::service::export!(Example);
struct Example;
impl wasip3::exports::http::handler::Guest for Example {
async fn handle(_request: Request) -> Result<Response, ErrorCode> {
let (mut body_tx, body_rx) = wit_stream::new();
let (body_result_tx, body_result_rx) = wit_future::new(|| Ok(None));
let (response, _future_result) =
Response::new(Fields::new(), Some(body_rx), body_result_rx);
drop(body_result_tx);
wit_bindgen::spawn(async move {
let remaining = body_tx.write_all(b"Hello, WASI!".to_vec()).await;
assert!(remaining.is_empty());
});
Ok(response)
}
}