Skip to content

remove wit/ and use the wasi crate instead #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ proxy = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
wasi = "0.13.2"
wit-bindgen-rt = { version = "0.24.0", features = ["bitflags"] }
8,502 changes: 0 additions & 8,502 deletions src/bindings.rs

This file was deleted.

9 changes: 3 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
mod bindings;

pub use bindings::wasi::http::types::{
pub use wasi::http::types::{
Fields, IncomingRequest, OutgoingBody, OutgoingResponse, ResponseOutparam,
};

struct Component;
wasi::http::proxy::export!(Component);

bindings::export!(Component with_types_in bindings);

impl bindings::exports::wasi::http::incoming_handler::Guest for Component {
impl wasi::exports::http::incoming_handler::Guest for Component {
fn handle(_request: IncomingRequest, outparam: ResponseOutparam) {
let hdrs = Fields::new();
let resp = OutgoingResponse::new(hdrs);
Expand Down
7 changes: 0 additions & 7 deletions wit/deps/cli/command.wit

This file was deleted.

18 changes: 0 additions & 18 deletions wit/deps/cli/environment.wit

This file was deleted.

4 changes: 0 additions & 4 deletions wit/deps/cli/exit.wit

This file was deleted.

20 changes: 0 additions & 20 deletions wit/deps/cli/imports.wit

This file was deleted.

4 changes: 0 additions & 4 deletions wit/deps/cli/run.wit

This file was deleted.

17 changes: 0 additions & 17 deletions wit/deps/cli/stdio.wit

This file was deleted.

49 changes: 0 additions & 49 deletions wit/deps/cli/terminal.wit

This file was deleted.

45 changes: 0 additions & 45 deletions wit/deps/clocks/monotonic-clock.wit

This file was deleted.

42 changes: 0 additions & 42 deletions wit/deps/clocks/wall-clock.wit

This file was deleted.

6 changes: 0 additions & 6 deletions wit/deps/clocks/world.wit

This file was deleted.

8 changes: 0 additions & 8 deletions wit/deps/filesystem/preopens.wit

This file was deleted.

Loading
Loading