diff --git a/Cargo.lock b/Cargo.lock index 05cee74700..b242db007a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3260,18 +3260,18 @@ checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" [[package]] name = "wasm-encoder" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef126be0e14bdf355ac1a8b41afc89195289e5c7179f80118e3abddb472f0810" +checksum = "1c3e4bc09095436c8e7584d86d33e6c3ee67045af8fb262cbb9cc321de553428" dependencies = [ "leb128", ] [[package]] name = "wasm-mutate" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd32bdc265dba5092bf434475b12b9e54dd405938a487bdd86aa41873fbd8532" +checksum = "87a229d5b8e4b2b78985dc905f0a033ba8a0bc948321622d41912238c6e0eab1" dependencies = [ "egg", "log", @@ -3283,9 +3283,9 @@ dependencies = [ [[package]] name = "wasm-smith" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa1d0e7cff965d746a1f559470bf4d9fbafd34fe11d4e34cfd0c382259bb986" +checksum = "411278ee8e89067a252a3a6d6d578038251f9c0a1d4c088adf4162ad13e97b04" dependencies = [ "arbitrary", "flagset", @@ -3335,9 +3335,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.99.0" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef3b717afc67f848f412d4f02c127dd3e35a0eecd58c684580414df4fde01d3" +checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" dependencies = [ "indexmap", "url", @@ -3354,9 +3354,9 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.2.49" +version = "0.2.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27c13dff901f9354fa9a6a877152d9c5642513645985635c9b83bcca99e40ea1" +checksum = "b2d3f7d7cb1e00ae9f91bb21f2856cdc68a913afb3b6b33fca5a83dba8c8c4eb" dependencies = [ "anyhow", "wasmparser", @@ -3509,7 +3509,7 @@ dependencies = [ "wasmtime-wasi-nn", "wasmtime-wasi-threads", "wasmtime-wast", - "wast 52.0.2", + "wast 53.0.0", "wat", "windows-sys", ] @@ -3796,7 +3796,7 @@ dependencies = [ "anyhow", "log", "wasmtime", - "wast 52.0.2", + "wast 53.0.0", ] [[package]] @@ -3831,9 +3831,9 @@ dependencies = [ [[package]] name = "wast" -version = "52.0.2" +version = "53.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707a9fd59b0144c530f0a31f21737036ffea6ece492918cae0843dd09b6f9bc9" +checksum = "8244fa24196b1d8fd3ca4a96a3a164c40f846498c5deab6caf414c67340ca4af" dependencies = [ "leb128", "memchr", @@ -3843,11 +3843,11 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d73cbaa81acc2f8a3303e2289205c971d99c89245c2f56ab8765c4daabc2be" +checksum = "4620f1059add6dad511decb9d5d88b4a0a0d3e2e315ed34f79b0dc0dce18aa4b" dependencies = [ - "wast 52.0.2", + "wast 53.0.0", ] [[package]] @@ -4095,9 +4095,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "896b2d88f139eb303e8e76fd72925115b11aad1944887ec2e5b2eeac1e58526f" +checksum = "6e0fe225a32528b42a7037add1b5ed1dff83288f21a067007b34565ce87fc2c7" dependencies = [ "anyhow", "id-arena", diff --git a/Cargo.toml b/Cargo.toml index 33cf23dd4a..715a80e47a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -162,14 +162,14 @@ winch-test-macros = { path = "winch/test-macros" } target-lexicon = { version = "0.12.3", default-features = false, features = ["std"] } anyhow = "1.0.22" -wasmparser = "0.99.0" -wat = "1.0.56" -wast = "52.0.2" -wasmprinter = "0.2.49" -wasm-encoder = "0.22.0" -wasm-smith = "0.12.0" -wasm-mutate = "0.2.16" -wit-parser = "0.5.0" +wasmparser = "0.100.0" +wat = "1.0.57" +wast = "53.0.0" +wasmprinter = "0.2.50" +wasm-encoder = "0.23.0" +wasm-smith = "0.12.1" +wasm-mutate = "0.2.17" +wit-parser = "0.6.0" windows-sys = "0.45.0" env_logger = "0.9" rustix = "0.36.7" diff --git a/crates/wit-bindgen/src/lib.rs b/crates/wit-bindgen/src/lib.rs index d02e883e7d..9fdde53177 100644 --- a/crates/wit-bindgen/src/lib.rs +++ b/crates/wit-bindgen/src/lib.rs @@ -132,7 +132,12 @@ impl Wasmtime { ); Import::Interface { snake } } - WorldItem::Type(_) => unreachable!(), + WorldItem::Type(ty) => { + gen.define_type(name, *ty); + let body = mem::take(&mut gen.src); + self.src.push_str(&body); + return; + } }; self.imports.push(import); @@ -150,12 +155,7 @@ impl Wasmtime { self.exports.funcs.push(body); (format!("wasmtime::component::Func"), getter) } - WorldItem::Type(ty) => { - gen.define_type(name, *ty); - let body = mem::take(&mut gen.src); - self.src.push_str(&body); - return; - } + WorldItem::Type(_) => unreachable!(), WorldItem::Interface(id) => { gen.current_interface = Some(*id); gen.types(*id); diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml index 4947df6480..7e5f289a75 100644 --- a/supply-chain/audits.toml +++ b/supply-chain/audits.toml @@ -756,6 +756,12 @@ criteria = "safe-to-deploy" version = "0.22.0" notes = "The Bytecode Alliance is the author of this crate." +[[audits.wasm-encoder]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "0.23.0" +notes = "The Bytecode Alliance is the author of this crate." + [[audits.wasm-encoder]] who = "Alex Crichton " criteria = "safe-to-deploy" @@ -828,6 +834,12 @@ criteria = "safe-to-run" version = "0.2.16" notes = "The Bytecode Alliance is the author of this crate." +[[audits.wasm-mutate]] +who = "Alex Crichton " +criteria = "safe-to-run" +version = "0.2.18" +notes = "The Bytecode Alliance is the author of this crate." + [[audits.wasm-smith]] who = "Alex Crichton " criteria = "safe-to-deploy" @@ -894,6 +906,12 @@ criteria = "safe-to-run" version = "0.12.0" notes = "The Bytecode Alliance is the author of this crate." +[[audits.wasm-smith]] +who = "Alex Crichton " +criteria = "safe-to-run" +version = "0.12.2" +notes = "The Bytecode Alliance is the author of this crate." + [[audits.wasmi]] who = "Robin Freyler " criteria = "safe-to-run" @@ -1008,6 +1026,12 @@ criteria = "safe-to-deploy" version = "0.99.0" notes = "The Bytecode Alliance is the author of this crate." +[[audits.wasmparser]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "0.100.0" +notes = "The Bytecode Alliance is the author of this crate." + [[audits.wasmparser-nostd]] who = "Alex Crichton " criteria = "safe-to-run" @@ -1085,6 +1109,12 @@ criteria = "safe-to-deploy" version = "0.2.49" notes = "The Bytecode Alliance is the author of this crate." +[[audits.wasmprinter]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "0.2.50" +notes = "The Bytecode Alliance is the author of this crate." + [[audits.wast]] who = "Alex Crichton " criteria = "safe-to-deploy" @@ -1151,6 +1181,12 @@ criteria = "safe-to-deploy" version = "52.0.2" notes = "The Bytecode Alliance is the author of this crate." +[[audits.wast]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "53.0.0" +notes = "The Bytecode Alliance is the author of this crate." + [[audits.wat]] who = "Alex Crichton " criteria = "safe-to-deploy" @@ -1199,6 +1235,12 @@ criteria = "safe-to-deploy" version = "1.0.56" notes = "The Bytecode Alliance is the author of this crate." +[[audits.wat]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "1.0.58" +notes = "The Bytecode Alliance is the author of this crate." + [[audits.wat]] who = "Alex Crichton " criteria = "safe-to-deploy" @@ -1349,3 +1391,9 @@ criteria = "safe-to-deploy" version = "0.5.0" notes = "The Bytecode Alliance is the author of this crate." +[[audits.wit-parser]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "0.6.0" +notes = "The Bytecode Alliance is the author of this crate." + diff --git a/supply-chain/config.toml b/supply-chain/config.toml index c59b1fa869..f190c03539 100644 --- a/supply-chain/config.toml +++ b/supply-chain/config.toml @@ -66,10 +66,6 @@ criteria = "safe-to-deploy" version = "0.1.8" criteria = "safe-to-deploy" -[[exemptions.base64]] -version = "0.13.0" -criteria = "safe-to-deploy" - [[exemptions.base64ct]] version = "1.1.1" criteria = "safe-to-deploy" diff --git a/tests/misc_testsuite/component-model/fused.wast b/tests/misc_testsuite/component-model/fused.wast index c80548ccb0..526fac274f 100644 --- a/tests/misc_testsuite/component-model/fused.wast +++ b/tests/misc_testsuite/component-model/fused.wast @@ -466,86 +466,6 @@ )) ) -;; struct field reordering -(component - (component $c1 - (type $in (record - (field "a" u32) - (field "b" bool) - (field "c" u8) - )) - (type $out (record - (field "x" u8) - (field "y" u32) - (field "z" bool) - )) - - (core module $m - (memory (export "memory") 1) - (func (export "r") (param i32 i32 i32) (result i32) - (if (i32.ne (local.get 0) (i32.const 3)) (unreachable)) ;; a == 3 - (if (i32.ne (local.get 1) (i32.const 1)) (unreachable)) ;; b == true - (if (i32.ne (local.get 2) (i32.const 2)) (unreachable)) ;; c == 2 - - - (i32.store8 offset=0 (i32.const 200) (i32.const 0xab)) ;; x == 0xab - (i32.store offset=4 (i32.const 200) (i32.const 200)) ;; y == 200 - (i32.store8 offset=8 (i32.const 200) (i32.const 0)) ;; z == false - i32.const 200 - ) - ) - (core instance $m (instantiate $m)) - (func (export "r") (param "a" $in) (result $out) - (canon lift (core func $m "r") (memory $m "memory")) - ) - ) - (component $c2 - ;; note the different field orderings than the records specified above - (type $in (record - (field "b" bool) - (field "c" u8) - (field "a" u32) - )) - (type $out (record - (field "z" bool) - (field "x" u8) - (field "y" u32) - )) - (import "r" (func $r (param "a" $in) (result $out))) - (core module $libc (memory (export "memory") 1)) - (core instance $libc (instantiate $libc)) - (core func $r (canon lower (func $r) (memory $libc "memory"))) - - (core module $m - (import "" "r" (func $r (param i32 i32 i32 i32))) - (import "libc" "memory" (memory 0)) - (func $start - i32.const 100 ;; b: bool - i32.const 2 ;; c: u8 - i32.const 3 ;; a: u32 - i32.const 100 ;; retptr - call $r - - ;; z == false - (if (i32.ne (i32.load8_u offset=0 (i32.const 100)) (i32.const 0)) (unreachable)) - ;; x == 0xab - (if (i32.ne (i32.load8_u offset=1 (i32.const 100)) (i32.const 0xab)) (unreachable)) - ;; y == 200 - (if (i32.ne (i32.load offset=4 (i32.const 100)) (i32.const 200)) (unreachable)) - ) - (start $start) - ) - (core instance (instantiate $m - (with "libc" (instance $libc)) - (with "" (instance - (export "r" (func $r)) - )) - )) - ) - (instance $c1 (instantiate $c1)) - (instance $c2 (instantiate $c2 (with "r" (func $c1 "r")))) -) - ;; callee retptr misaligned (assert_trap (component