Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 90b9354

Browse files
committed
feat(p3): implement wasi:http
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
1 parent dcfc1f5 commit 90b9354

52 files changed

Lines changed: 2955 additions & 2386 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ci/vendor-wit.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ make_vendor "wasi/src/p3" "
7070
random@9499404@wit-0.3.0-draft
7171
sockets@41d7079@wit-0.3.0-draft
7272
"
73+
# `wasi:http` from https://github.com/WebAssembly/wasi-http/pull/158
74+
make_vendor "wasi-http/src/p3" "
75+
cli@82b86d9@wit-0.3.0-draft
76+
clocks@646092f@wit-0.3.0-draft
77+
filesystem@740cd76@wit-0.3.0-draft
78+
random@9499404@wit-0.3.0-draft
79+
sockets@41d7079@wit-0.3.0-draft
80+
http@7ae64df@wit-0.3.0-draft
81+
"
7382

7483
rm -rf $cache_dir
7584

crates/wasi-http/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,11 @@ tokio = { workspace = true, features = ['macros'] }
4444
futures = { workspace = true, default-features = false, features = ['alloc'] }
4545
sha2 = "0.10.2"
4646
base64 = "0.21.0"
47+
48+
[features]
49+
default = ["p3"]
50+
p3 = [
51+
"wasmtime-wasi/p3",
52+
"wasmtime/component-model-async",
53+
]
54+

crates/wasi-http/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ pub mod types;
226226

227227
pub mod bindings;
228228

229+
#[cfg(feature = "p3")]
230+
pub mod p3;
231+
229232
pub use crate::error::{
230233
http_request_error, hyper_request_error, hyper_response_error, HttpError, HttpResult,
231234
};

crates/wasi-http/src/p2/wit/deps/cli@v0.2.3/command.wit

Lines changed: 0 additions & 10 deletions
This file was deleted.

crates/wasi-http/src/p2/wit/deps/cli@v0.2.3/imports.wit

Lines changed: 0 additions & 36 deletions
This file was deleted.

crates/wasi-http/src/p2/wit/deps/cli@v0.2.3/stdio.wit

Lines changed: 0 additions & 26 deletions
This file was deleted.

crates/wasi-http/src/p2/wit/deps/filesystem@v0.2.3/world.wit

Lines changed: 0 additions & 9 deletions
This file was deleted.

crates/wasi-http/src/p2/wit/deps/http@v0.2.3/handler.wit

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)