Skip to content

Commit 91a883f

Browse files
authored
Merge pull request #9 from yoshuawuyts/remove-wit-
remove wit/ and use the `wasi` crate instead
2 parents 87cb072 + 269ae06 commit 91a883f

37 files changed

+24
-11287
lines changed

Cargo.lock

Lines changed: 20 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ proxy = true
2929
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
3030

3131
[dependencies]
32+
wasi = "0.13.2"
3233
wit-bindgen-rt = { version = "0.24.0", features = ["bitflags"] }

src/bindings.rs

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

src/lib.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
mod bindings;
2-
3-
pub use bindings::wasi::http::types::{
1+
pub use wasi::http::types::{
42
Fields, IncomingRequest, OutgoingBody, OutgoingResponse, ResponseOutparam,
53
};
64

75
struct Component;
6+
wasi::http::proxy::export!(Component);
87

9-
bindings::export!(Component with_types_in bindings);
10-
11-
impl bindings::exports::wasi::http::incoming_handler::Guest for Component {
8+
impl wasi::exports::http::incoming_handler::Guest for Component {
129
fn handle(_request: IncomingRequest, outparam: ResponseOutparam) {
1310
let hdrs = Fields::new();
1411
let resp = OutgoingResponse::new(hdrs);

wit/deps/cli/command.wit

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

wit/deps/cli/environment.wit

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

wit/deps/cli/exit.wit

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

wit/deps/cli/imports.wit

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

wit/deps/cli/run.wit

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

wit/deps/cli/stdio.wit

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

0 commit comments

Comments
 (0)