Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
./ci/vendor-wit.sh
git diff --exit-code
- run: |
version=0.60.0
version=0.61.0

mkdir wit-bindgen
cd wit-bindgen
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rust-version = "1.87.0"
[workspace.dependencies]
rand = { version = "0.8.5", default-features = false }
wasi = { version = "0.14.6", path = ".", default-features = false }
wit-bindgen = { version = "0.57.1", default-features = false }
wit-bindgen = { version = "0.61.0", default-features = false }
wasip1 = { version = "1.0.0", path = "crates/wasip1", default-features = false }
wasip2 = { version = "1.0.1", path = "crates/wasip2", default-features = false }
wasip3 = { version = "0.1.1", path = "crates/wasip3", default-features = false }
Expand Down
16 changes: 8 additions & 8 deletions crates/wasip2/src/command.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by `wit-bindgen` 0.60.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.61.0. DO NOT EDIT!
// Options used:
// * std_feature
// * with "wasi:cli/environment@0.2.12" = "crate::cli::environment"
Expand Down Expand Up @@ -113,7 +113,7 @@ pub mod exports {
pub trait Guest {
/// Run the program.
#[allow(async_fn_in_trait)]
fn run() -> Result<(), ()>;
fn run() -> ::core::result::Result<(), ()>;
}
#[doc(hidden)]
#[macro_export]
Expand Down Expand Up @@ -167,7 +167,7 @@ macro_rules! __export_command_impl {
exports::wasi::cli::run::__export_wasi_cli_run_0_2_12_cabi!($ty with_types_in
$($path_to_types_root)*:: exports::wasi::cli::run); const _ : () = {
#[rustfmt::skip] #[cfg(target_arch = "wasm32")] #[unsafe (link_section =
"component-type:wit-bindgen:0.60.0:wasi:cli@0.2.12:command:imports and exportsrust-wasip2-1.0.4+wasi-0.2.12-from-crates-io-command-world")]
"component-type:wit-bindgen:0.61.0:wasi:cli@0.2.12:command:imports and exportsrust-wasip2-1.0.4+wasi-0.2.12-from-crates-io-command-world")]
#[doc(hidden)] #[allow(clippy::octal_escapes)] pub static
__WIT_BINDGEN_COMPONENT_TYPE : [u8; 10839] = *
b"\
Expand Down Expand Up @@ -389,7 +389,7 @@ get-insecure-random-u64\x01\x02\x03\0\x1bwasi:random/insecure@0.2.12\x05*\x01B\x
ure-seed@0.2.12\x05+\x01B\x03\x01j\0\0\x01@\0\0\0\x04\0\x03run\x01\x01\x04\0\x13\
wasi:cli/run@0.2.12\x05,\x04\0\x17wasi:cli/command@0.2.12\x04\0\x0b\x0d\x01\0\x07\
command\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.25\
4.0\x10wit-bindgen-rust\x060.60.0";
8.0\x10wit-bindgen-rust\x060.61.0";
};
};
}
Expand All @@ -398,8 +398,8 @@ pub use __export_command_impl as _export_command;
#[rustfmt::skip]
#[cfg(target_arch = "wasm32")]

#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.60.0:wasi:cli@0.2.12:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.4+wasi-0.2.12-from-crates-io-command-world-in-libstd"))]
#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.60.0:wasi:cli@0.2.12:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.4+wasi-0.2.12-from-crates-io-command-world"))]
#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:cli@0.2.12:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.4+wasi-0.2.12-from-crates-io-command-world-in-libstd"))]
#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:cli@0.2.12:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.4+wasi-0.2.12-from-crates-io-command-world"))]

#[doc(hidden)]
#[allow(clippy::octal_escapes)]
Expand Down Expand Up @@ -621,8 +621,8 @@ get-insecure-random-u64\x01\x02\x03\0\x1bwasi:random/insecure@0.2.12\x05*\x01B\x
\x01o\x02ww\x01@\0\0\0\x04\0\x0dinsecure-seed\x01\x01\x03\0\x20wasi:random/insec\
ure-seed@0.2.12\x05+\x04\07wasi:cli/command-with-all-of-its-exports-removed@0.2.\
12\x04\0\x0b-\x01\0'command-with-all-of-its-exports-removed\x03\0\0\0G\x09produc\
ers\x01\x0cprocessed-by\x02\x0dwit-component\x070.254.0\x10wit-bindgen-rust\x060\
.60.0";
ers\x01\x0cprocessed-by\x02\x0dwit-component\x070.258.0\x10wit-bindgen-rust\x060\
.61.0";
#[inline(never)]
#[doc(hidden)]
pub fn __link_custom_section_describing_imports() {
Expand Down
290 changes: 191 additions & 99 deletions crates/wasip2/src/imports.rs

Large diffs are not rendered by default.

147 changes: 86 additions & 61 deletions crates/wasip2/src/proxy.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/wasip3/examples/http-proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl wasip3::exports::http::handler::Guest for Example {
Response::new(Fields::new(), Some(body_rx), body_result_rx);
drop(body_result_tx);

wit_bindgen::spawn(async move {
wit_bindgen::spawn_local(async move {
let remaining = body_tx.write_all(b"Hello, WASI!".to_vec()).await;
assert!(remaining.is_empty());
});
Expand Down
16 changes: 8 additions & 8 deletions crates/wasip3/src/command.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by `wit-bindgen` 0.60.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.61.0. DO NOT EDIT!
// Options used:
// * std_feature
// * with "wasi:cli/environment@0.3.0" = "crate::cli::environment"
Expand Down Expand Up @@ -120,7 +120,7 @@ pub mod exports {
pub trait Guest {
/// Run the program.
#[allow(async_fn_in_trait)]
async fn run() -> Result<(), ()>;
async fn run() -> ::core::result::Result<(), ()>;
}
#[doc(hidden)]
#[macro_export]
Expand Down Expand Up @@ -178,7 +178,7 @@ macro_rules! __export_command_impl {
exports::wasi::cli::run::__export_wasi_cli_run_0_3_0_cabi!($ty with_types_in
$($path_to_types_root)*:: exports::wasi::cli::run); const _ : () = {
#[rustfmt::skip] #[cfg(target_arch = "wasm32")] #[unsafe (link_section =
"component-type:wit-bindgen:0.60.0:wasi:cli@0.3.0:command:imports and exportsrust-wasip3-0.7.1+wasi-0.3.0-from-crates-io-command-world")]
"component-type:wit-bindgen:0.61.0:wasi:cli@0.3.0:command:imports and exportsrust-wasip3-0.7.1+wasi-0.3.0-from-crates-io-command-world")]
#[doc(hidden)] #[allow(clippy::octal_escapes)] pub static
__WIT_BINDGEN_COMPONENT_TYPE : [u8; 7934] = *
b"\
Expand Down Expand Up @@ -338,7 +338,7 @@ B\x05\x01p}\x01@\x01\x07max-lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\
\0\x1fwasi:random/insecure-seed@0.3.0\x05\x1b\x01B\x03\x01j\0\0\x01C\0\0\0\x04\0\
\x03run\x01\x01\x04\0\x12wasi:cli/run@0.3.0\x05\x1c\x04\0\x16wasi:cli/command@0.\
3.0\x04\0\x0b\x0d\x01\0\x07command\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\
\x0dwit-component\x070.254.0\x10wit-bindgen-rust\x060.60.0";
\x0dwit-component\x070.258.0\x10wit-bindgen-rust\x060.61.0";
};
};
}
Expand All @@ -347,8 +347,8 @@ pub use __export_command_impl as _export_command;
#[rustfmt::skip]
#[cfg(target_arch = "wasm32")]

#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.60.0:wasi:cli@0.3.0:command-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.7.1+wasi-0.3.0-from-crates-io-command-world-in-libstd"))]
#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.60.0:wasi:cli@0.3.0:command-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.7.1+wasi-0.3.0-from-crates-io-command-world"))]
#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:cli@0.3.0:command-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.7.1+wasi-0.3.0-from-crates-io-command-world-in-libstd"))]
#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:cli@0.3.0:command-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.7.1+wasi-0.3.0-from-crates-io-command-world"))]

#[doc(hidden)]
#[allow(clippy::octal_escapes)]
Expand Down Expand Up @@ -508,8 +508,8 @@ B\x05\x01p}\x01@\x01\x07max-lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\
3.0\x05\x1a\x01B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insecure-seed\x01\x01\x03\
\0\x1fwasi:random/insecure-seed@0.3.0\x05\x1b\x04\06wasi:cli/command-with-all-of\
-its-exports-removed@0.3.0\x04\0\x0b-\x01\0'command-with-all-of-its-exports-remo\
ved\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.254.0\x10\
wit-bindgen-rust\x060.60.0";
ved\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.258.0\x10\
wit-bindgen-rust\x060.61.0";
#[inline(never)]
#[doc(hidden)]
pub fn __link_custom_section_describing_imports() {
Expand Down
4 changes: 2 additions & 2 deletions crates/wasip3/src/http_compat/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ where

_ = response.set_status_code(resp.status().as_u16());

wit_bindgen::spawn(async move {
wit_bindgen::spawn_local(async move {
let mut body = std::pin::pin!(resp.into_body());
_ = body_writer.send_http_body(&mut body).await;
});
Expand Down Expand Up @@ -153,7 +153,7 @@ where
req.set_path_with_query(parts.uri.path_and_query().map(|pq| pq.as_str()))
.map_err(|()| ErrorCode::HttpRequestUriInvalid)?;

wit_bindgen::spawn(async move {
wit_bindgen::spawn_local(async move {
let mut body = std::pin::pin!(body);
_ = body_writer.send_http_body(&mut body).await;
});
Expand Down
Loading