From a0543ceb7544a1f51fdc09350166b179ef4c03e1 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 2 Aug 2024 13:03:47 -0500 Subject: [PATCH 1/2] Add `--all-features` to the CLI (#1015) Mirrors the `wasm-tools` CLI --- src/bin/wit-bindgen.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bin/wit-bindgen.rs b/src/bin/wit-bindgen.rs index ed9134fca..48546be6a 100644 --- a/src/bin/wit-bindgen.rs +++ b/src/bin/wit-bindgen.rs @@ -104,6 +104,12 @@ struct Common { /// This enables using `@unstable` annotations in WIT files. #[clap(long)] features: Vec, + + /// Whether or not to activate all WIT features when processing WIT files. + /// + /// This enables using `@unstable` annotations in WIT files. + #[clap(long)] + all_features: bool, } fn main() -> Result<()> { @@ -183,6 +189,7 @@ fn gen_world( files: &mut Files, ) -> Result<()> { let mut resolve = Resolve::default(); + resolve.all_features = opts.all_features; for features in opts.features.iter() { for feature in features .split(',') From a20a9497019fc6ad7c7d6f10d1a6dae8c127a392 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 13:13:54 -0500 Subject: [PATCH 2/2] Release wit-bindgen 0.29.0 (#1016) [automatically-tag-and-release-this-commit] Co-authored-by: Auto Release Process --- Cargo.lock | 22 +++++++++--------- Cargo.toml | 18 +++++++------- crates/guest-rust/Cargo.toml | 4 ++-- crates/guest-rust/rt/src/cabi_realloc.c | 4 ++-- crates/guest-rust/rt/src/cabi_realloc.o | Bin 261 -> 261 bytes crates/guest-rust/rt/src/cabi_realloc.rs | 2 +- .../rt/src/libwit_bindgen_cabi_realloc.a | Bin 412 -> 412 bytes 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 648c1d97c..39656d1d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2268,7 +2268,7 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.28.0" +version = "0.29.0" dependencies = [ "wit-bindgen-rt", "wit-bindgen-rust-macro", @@ -2276,7 +2276,7 @@ dependencies = [ [[package]] name = "wit-bindgen-c" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", @@ -2291,7 +2291,7 @@ dependencies = [ [[package]] name = "wit-bindgen-cli" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", @@ -2314,7 +2314,7 @@ dependencies = [ [[package]] name = "wit-bindgen-core" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "heck 0.5.0", @@ -2323,7 +2323,7 @@ dependencies = [ [[package]] name = "wit-bindgen-csharp" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", @@ -2340,7 +2340,7 @@ dependencies = [ [[package]] name = "wit-bindgen-go" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", @@ -2352,7 +2352,7 @@ dependencies = [ [[package]] name = "wit-bindgen-markdown" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", @@ -2364,14 +2364,14 @@ dependencies = [ [[package]] name = "wit-bindgen-rt" -version = "0.28.0" +version = "0.29.0" dependencies = [ "bitflags", ] [[package]] name = "wit-bindgen-rust" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", @@ -2390,7 +2390,7 @@ dependencies = [ [[package]] name = "wit-bindgen-rust-macro" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "prettyplease", @@ -2403,7 +2403,7 @@ dependencies = [ [[package]] name = "wit-bindgen-teavm-java" -version = "0.28.0" +version = "0.29.0" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 65fd2026c..072fa50ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ resolver = "2" [workspace.package] edition = "2021" -version = "0.28.0" +version = "0.29.0" license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" repository = "https://github.com/bytecodealliance/wasi-rs" @@ -38,14 +38,14 @@ wasm-metadata = "0.215.0" wit-parser = "0.215.0" wit-component = "0.215.0" -wit-bindgen-core = { path = 'crates/core', version = '0.28.0' } -wit-bindgen-c = { path = 'crates/c', version = '0.28.0' } -wit-bindgen-rust = { path = "crates/rust", version = "0.28.0" } -wit-bindgen-teavm-java = { path = 'crates/teavm-java', version = '0.28.0' } -wit-bindgen-go = { path = 'crates/go', version = '0.28.0' } -wit-bindgen-csharp = { path = 'crates/csharp', version = '0.28.0' } -wit-bindgen-markdown = { path = 'crates/markdown', version = '0.28.0' } -wit-bindgen = { path = 'crates/guest-rust', version = '0.28.0', default-features = false } +wit-bindgen-core = { path = 'crates/core', version = '0.29.0' } +wit-bindgen-c = { path = 'crates/c', version = '0.29.0' } +wit-bindgen-rust = { path = "crates/rust", version = "0.29.0" } +wit-bindgen-teavm-java = { path = 'crates/teavm-java', version = '0.29.0' } +wit-bindgen-go = { path = 'crates/go', version = '0.29.0' } +wit-bindgen-csharp = { path = 'crates/csharp', version = '0.29.0' } +wit-bindgen-markdown = { path = 'crates/markdown', version = '0.29.0' } +wit-bindgen = { path = 'crates/guest-rust', version = '0.29.0', default-features = false } [[bin]] name = "wit-bindgen" diff --git a/crates/guest-rust/Cargo.toml b/crates/guest-rust/Cargo.toml index 43f2be1e7..1dd9b8e93 100644 --- a/crates/guest-rust/Cargo.toml +++ b/crates/guest-rust/Cargo.toml @@ -12,8 +12,8 @@ Used when compiling Rust programs to the component model. """ [dependencies] -wit-bindgen-rust-macro = { path = "./macro", optional = true, version = "0.28.0" } -wit-bindgen-rt = { path = "./rt", version = "0.28.0", features = ["bitflags"] } +wit-bindgen-rust-macro = { path = "./macro", optional = true, version = "0.29.0" } +wit-bindgen-rt = { path = "./rt", version = "0.29.0", features = ["bitflags"] } [features] default = ["macros", "realloc"] diff --git a/crates/guest-rust/rt/src/cabi_realloc.c b/crates/guest-rust/rt/src/cabi_realloc.c index 3687f341d..4e8fbb3a3 100644 --- a/crates/guest-rust/rt/src/cabi_realloc.c +++ b/crates/guest-rust/rt/src/cabi_realloc.c @@ -2,9 +2,9 @@ #include -extern void *cabi_realloc_wit_bindgen_0_28_0(void *ptr, size_t old_size, size_t align, size_t new_size); +extern void *cabi_realloc_wit_bindgen_0_29_0(void *ptr, size_t old_size, size_t align, size_t new_size); __attribute__((__weak__, __export_name__("cabi_realloc"))) void *cabi_realloc(void *ptr, size_t old_size, size_t align, size_t new_size) { - return cabi_realloc_wit_bindgen_0_28_0(ptr, old_size, align, new_size); + return cabi_realloc_wit_bindgen_0_29_0(ptr, old_size, align, new_size); } diff --git a/crates/guest-rust/rt/src/cabi_realloc.o b/crates/guest-rust/rt/src/cabi_realloc.o index cdb99a32bf4341f9dfe598773e15b320ac99e8c1..1c1e8ef76b6ccf7ee2bfd8bef391324ed5d49f7c 100644 GIT binary patch delta 11 ScmZo=YGs<>$7ngxe;WW4M+3b8 delta 11 ScmZo=YGs<>$7nIpe;WW4Lj$}3 diff --git a/crates/guest-rust/rt/src/cabi_realloc.rs b/crates/guest-rust/rt/src/cabi_realloc.rs index 90af32344..63a22fba5 100644 --- a/crates/guest-rust/rt/src/cabi_realloc.rs +++ b/crates/guest-rust/rt/src/cabi_realloc.rs @@ -1,7 +1,7 @@ // This file is generated by ./ci/rebuild-libcabi-realloc.sh #[no_mangle] -pub unsafe extern "C" fn cabi_realloc_wit_bindgen_0_28_0( +pub unsafe extern "C" fn cabi_realloc_wit_bindgen_0_29_0( old_ptr: *mut u8, old_len: usize, align: usize, diff --git a/crates/guest-rust/rt/src/libwit_bindgen_cabi_realloc.a b/crates/guest-rust/rt/src/libwit_bindgen_cabi_realloc.a index aa8111db9ab7935179377ef6f30dec7ded23c5a2..38c36c501ced36952d2f11cf532883a019739e95 100644 GIT binary patch delta 11 TcmbQkJcoJ06GqF4PqzaA8rB6G delta 11 TcmbQkJcoJ06Gn@PPqzaA8qx(B