diff --git a/Cargo.lock b/Cargo.lock index 3d5aafd08..a9d24eba6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,7 +35,7 @@ dependencies = [ "cfg-if", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -55,9 +55,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -70,36 +70,36 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ - "windows-sys 0.52.0", + "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -184,9 +184,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "fca2be1d5c43812bae364ee3f30b3afcb7877cf59f4aeb94c66f313a41d2fac9" [[package]] name = "cap-fs-ext" @@ -197,7 +197,7 @@ dependencies = [ "cap-primitives", "cap-std", "io-lifetimes", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -225,7 +225,7 @@ dependencies = [ "ipnet", "maybe-owned", "rustix", - "windows-sys 0.52.0", + "windows-sys", "winx", ] @@ -267,13 +267,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.0" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" +checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" dependencies = [ "jobserver", "libc", - "once_cell", ] [[package]] @@ -284,9 +283,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.5.9" +version = "4.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +checksum = "c53aa12ec67affac065e7c7dd20a42fa2a4094921b655711d5d3107bb3d52bed" dependencies = [ "clap_builder", "clap_derive", @@ -294,9 +293,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.9" +version = "4.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +checksum = "efbdf2dd5fe10889e0c61942ff5d948aaf12fd0b4504408ab0cbb1916c2cffa9" dependencies = [ "anstream", "anstyle", @@ -306,9 +305,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "5d029b67f89d30bbb547c89fd5161293c0aec155fc691d7924b64550662db93e" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -318,9 +317,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cobs" @@ -338,9 +337,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "core-foundation-sys" @@ -614,7 +613,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -631,7 +630,7 @@ checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" dependencies = [ "cfg-if", "rustix", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -651,7 +650,7 @@ checksum = "033b337d725b97690d86893f9de22b67b80dcc4e9ad815f348254c38119db8fb" dependencies = [ "io-lifetimes", "rustix", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -869,7 +868,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9f046b9af244f13b3bd939f55d16830ac3a201e8a9ba9661bfcb03e2be72b9b" dependencies = [ "io-lifetimes", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -886,9 +885,9 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -927,9 +926,9 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -1033,30 +1032,21 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" dependencies = [ "hermit-abi", "libc", + "wasi", + "windows-sys", ] [[package]] name = "object" -version = "0.36.1" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" dependencies = [ "crc32fast", "hashbrown 0.14.5", @@ -1113,9 +1103,12 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "dee4364d9f3b902ef14fab8a1ddffb783a1cb6b4bba3bfc1fa3922732c7de97f" +dependencies = [ + "zerocopy 0.6.6", +] [[package]] name = "prettyplease" @@ -1270,7 +1263,7 @@ dependencies = [ "libc", "linux-raw-sys", "once_cell", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1307,20 +1300,21 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -1367,7 +1361,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1399,9 +1393,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.70" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -1420,15 +1414,15 @@ dependencies = [ "fd-lock", "io-lifetimes", "rustix", - "windows-sys 0.52.0", + "windows-sys", "winx", ] [[package]] name = "target-lexicon" -version = "0.12.15" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "test-artifacts" @@ -1439,7 +1433,7 @@ name = "test-helpers" version = "0.0.0" dependencies = [ "codegen-macro", - "wasm-encoder 0.214.0 (git+https://github.com/cpetig/wasm-tools?branch=symmetric)", + "wasm-encoder 0.214.0", "wit-bindgen-core", "wit-component", "wit-parser 0.214.0", @@ -1455,18 +1449,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -1490,25 +1484,24 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", "socket2", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "toml" -version = "0.8.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -1518,18 +1511,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.15" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "serde", @@ -1642,9 +1635,9 @@ checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wasi" @@ -1718,19 +1711,19 @@ dependencies = [ [[package]] name = "wasm-encoder" version = "0.214.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff694f02a8d7a50b6922b197ae03883fbf18cdb2ae9fbee7b6148456f5f44041" +source = "git+https://github.com/cpetig/wasm-tools?branch=symmetric#fcbcd794d865bd52593a2cb6854c9b75b6ef3bbc" dependencies = [ "leb128", + "wasmparser 0.214.0", ] [[package]] name = "wasm-encoder" -version = "0.214.0" -source = "git+https://github.com/cpetig/wasm-tools?branch=symmetric#fcbcd794d865bd52593a2cb6854c9b75b6ef3bbc" +version = "0.215.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb56df3e06b8e6b77e37d2969a50ba51281029a9aeb3855e76b7f49b6418847" dependencies = [ "leb128", - "wasmparser 0.214.0", ] [[package]] @@ -1744,7 +1737,7 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.214.0 (git+https://github.com/cpetig/wasm-tools?branch=symmetric)", + "wasm-encoder 0.214.0", "wasmparser 0.214.0", ] @@ -1837,8 +1830,8 @@ dependencies = [ "wasmtime-slab", "wasmtime-versioned-export-macros", "wasmtime-winch", - "wat 1.214.0 (registry+https://github.com/rust-lang/crates.io-index)", - "windows-sys 0.52.0", + "wat 1.215.0", + "windows-sys", ] [[package]] @@ -1866,7 +1859,7 @@ dependencies = [ "serde_derive", "sha2", "toml", - "windows-sys 0.52.0", + "windows-sys", "zstd", ] @@ -1952,7 +1945,7 @@ dependencies = [ "rustix", "wasmtime-asm-macros", "wasmtime-versioned-export-macros", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1976,7 +1969,7 @@ dependencies = [ "anyhow", "cfg-if", "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -2037,7 +2030,7 @@ dependencies = [ "url", "wasmtime", "wiggle", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -2081,43 +2074,43 @@ dependencies = [ [[package]] name = "wast" version = "214.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "694bcdb24c49c8709bd8713768b71301a11e823923eee355d530f1d8d0a7f8e9" +source = "git+https://github.com/cpetig/wasm-tools?branch=symmetric#fcbcd794d865bd52593a2cb6854c9b75b6ef3bbc" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.214.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-encoder 0.214.0", ] [[package]] name = "wast" -version = "214.0.0" -source = "git+https://github.com/cpetig/wasm-tools?branch=symmetric#fcbcd794d865bd52593a2cb6854c9b75b6ef3bbc" +version = "215.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ff1d00d893593249e60720be04a7c1f42f1c4dc3806a2869f4e66ab61eb54cb" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.214.0 (git+https://github.com/cpetig/wasm-tools?branch=symmetric)", + "wasm-encoder 0.215.0", ] [[package]] name = "wat" version = "1.214.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "347249eb56773fa728df2656cfe3a8c19437ded61a922a0b5e0839d9790e278e" +source = "git+https://github.com/cpetig/wasm-tools?branch=symmetric#fcbcd794d865bd52593a2cb6854c9b75b6ef3bbc" dependencies = [ - "wast 214.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wast 214.0.0", ] [[package]] name = "wat" -version = "1.214.0" -source = "git+https://github.com/cpetig/wasm-tools?branch=symmetric#fcbcd794d865bd52593a2cb6854c9b75b6ef3bbc" +version = "1.215.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670bf4d9c8cf76ae242d70ded47c546525b6dafaa6871f9bcb065344bf2b4e3d" dependencies = [ - "wast 214.0.0 (git+https://github.com/cpetig/wasm-tools?branch=symmetric)", + "wast 215.0.0", ] [[package]] @@ -2207,16 +2200,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", + "windows-targets", ] [[package]] @@ -2225,22 +2209,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -2249,46 +2218,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2301,48 +2252,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -2351,9 +2278,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -2365,7 +2292,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9643b83820c0cd246ecabe5fa454dd04ba4fa67996369466d0747472d337346" dependencies = [ "bitflags", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -2395,7 +2322,7 @@ dependencies = [ "clap", "heck 0.5.0", "test-helpers", - "wasm-encoder 0.214.0 (git+https://github.com/cpetig/wasm-tools?branch=symmetric)", + "wasm-encoder 0.214.0", "wasm-metadata", "wit-bindgen-core", "wit-component", @@ -2410,7 +2337,7 @@ dependencies = [ "clap", "heck 0.5.0", "test-artifacts", - "wasm-encoder 0.214.0 (git+https://github.com/cpetig/wasm-tools?branch=symmetric)", + "wasm-encoder 0.214.0", "wasmparser 0.214.0", "wasmtime", "wasmtime-wasi", @@ -2444,7 +2371,7 @@ dependencies = [ "clap", "heck 0.5.0", "test-helpers", - "wasm-encoder 0.214.0 (git+https://github.com/cpetig/wasm-tools?branch=symmetric)", + "wasm-encoder 0.214.0", "wasm-metadata", "wit-bindgen-c", "wit-bindgen-core", @@ -2460,7 +2387,7 @@ dependencies = [ "heck 0.5.0", "indexmap", "test-helpers", - "wasm-encoder 0.214.0 (git+https://github.com/cpetig/wasm-tools?branch=symmetric)", + "wasm-encoder 0.214.0", "wasm-metadata", "wasmparser 0.214.0", "wit-bindgen-core", @@ -2556,10 +2483,10 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.214.0 (git+https://github.com/cpetig/wasm-tools?branch=symmetric)", + "wasm-encoder 0.214.0", "wasm-metadata", "wasmparser 0.214.0", - "wat 1.214.0 (git+https://github.com/cpetig/wasm-tools?branch=symmetric)", + "wat 1.214.0", "wit-parser 0.214.0", ] @@ -2610,13 +2537,34 @@ dependencies = [ "wast 35.0.2", ] +[[package]] +name = "zerocopy" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6" +dependencies = [ + "byteorder", + "zerocopy-derive 0.6.6", +] + [[package]] name = "zerocopy" version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy-derive" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] diff --git a/crates/c/tests/codegen.rs b/crates/c/tests/codegen.rs index 432136896..7546cd846 100644 --- a/crates/c/tests/codegen.rs +++ b/crates/c/tests/codegen.rs @@ -94,7 +94,7 @@ fn rename_option() -> Result<()> { opts.rename.push(("c".to_string(), "rename3".to_string())); let mut resolve = Resolve::default(); - let pkgs = resolve.push_group(UnresolvedPackageGroup::parse( + let pkg = resolve.push_group(UnresolvedPackageGroup::parse( "input.wit", r#" package foo:bar; @@ -118,7 +118,7 @@ fn rename_option() -> Result<()> { } "#, )?)?; - let world = resolve.select_world(&pkgs, None)?; + let world = resolve.select_world(pkg, None)?; let mut files = Default::default(); opts.build().generate(&resolve, world, &mut files)?; for (file, contents) in files.iter() { diff --git a/crates/csharp/src/lib.rs b/crates/csharp/src/lib.rs index 3a9304d45..3592dea88 100644 --- a/crates/csharp/src/lib.rs +++ b/crates/csharp/src/lib.rs @@ -472,9 +472,9 @@ impl WorldGenerator for CSharp { {{ get {{ - if (Tag == OK) + if (Tag == OK) return (Ok)value; - else + else throw new ArgumentException("expected OK, got " + Tag); }} }} @@ -504,23 +504,23 @@ impl WorldGenerator for CSharp { {access} class Option {{ private static Option none = new (); - + private Option() {{ HasValue = false; }} - + {access} Option(T v) {{ HasValue = true; Value = v; }} - + {access} static Option None => none; - + [MemberNotNullWhen(true, nameof(Value))] {access} bool HasValue {{ get; }} - + {access} T? Value {{ get; }} }} "#, @@ -754,13 +754,14 @@ impl WorldGenerator for CSharp { // intended to be used non-interactively at link time, the // linker will have no additional information to resolve such // ambiguity. - let (resolve, _) = + let (resolve, world) = wit_parser::decoding::decode_world(&wit_component::metadata::encode( &resolve, id, self.opts.string_encoding, None, )?)?; + let pkg = resolve.worlds[world].package.unwrap(); files.push( &format!("{world_namespace}_component_type.wit"), @@ -768,12 +769,12 @@ impl WorldGenerator for CSharp { .emit_docs(false) .print( &resolve, + pkg, &resolve .packages .iter() - .map(|(id, _)| id) + .filter_map(|(id, _)| if id == pkg { None } else { Some(id) }) .collect::>(), - false, )? .as_bytes(), ); @@ -1484,9 +1485,9 @@ impl InterfaceGenerator<'_> { {access} class {upper_camel}: IDisposable {{ internal int Handle {{ get; set; }} - internal readonly record struct THandle(int Handle); + {access} readonly record struct THandle(int Handle); - internal {upper_camel}(THandle handle) {{ + {access} {upper_camel}(THandle handle) {{ Handle = handle.Handle; }} @@ -1497,7 +1498,7 @@ impl InterfaceGenerator<'_> { [DllImport("{module_name}", EntryPoint = "[resource-drop]{name}"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); - + protected virtual void Dispose(bool disposing) {{ if (Handle != 0) {{ wasmImportResourceDrop(Handle); @@ -1567,7 +1568,7 @@ impl InterfaceGenerator<'_> { [DllImport("{module_name}", EntryPoint = "[resource-new]{name}"), WasmImportLinkage] internal static extern int wasmImportResourceNew(int p0); - + [DllImport("{module_name}", EntryPoint = "[resource-rep]{name}"), WasmImportLinkage] internal static extern int wasmImportResourceRep(int p0); }} @@ -1847,15 +1848,15 @@ impl<'a> wit_bindgen_core::InterfaceGenerator<'a> for InterfaceGenerator<'a> { let tag = case.name.to_shouty_snake_case(); let ty = self.type_name(ty); format!( - r#"{access} {ty} As{case_name} - {{ - get + r#"{access} {ty} As{case_name} + {{ + get {{ - if (Tag == {tag}) + if (Tag == {tag}) return ({ty})value!; - else + else throw new ArgumentException("expected {tag}, got " + Tag); - }} + }} }} "# ) @@ -2587,8 +2588,8 @@ impl Bindgen for FunctionBindgen<'_, '_> { uwrite!( self.src, " - var {array} = new {ty}[{length}]; - new Span<{ty}>((void*)({address}), {length}).CopyTo(new Span<{ty}>({array})); + var {array} = new {ty}[{length}]; + new Span<{ty}>((void*)({address}), {length}).CopyTo(new Span<{ty}>({array})); " ); diff --git a/crates/guest-rust/macro/src/lib.rs b/crates/guest-rust/macro/src/lib.rs index 1042615fd..ddce4818c 100644 --- a/crates/guest-rust/macro/src/lib.rs +++ b/crates/guest-rust/macro/src/lib.rs @@ -165,8 +165,7 @@ impl Parse for Config { } let (resolve, pkgs, files) = parse_source(&source, &features).map_err(|err| anyhow_to_syn(call_site, err))?; - let world = resolve - .select_world(&pkgs, world.as_deref()) + let world = select_world(&resolve, &pkgs, world.as_deref()) .map_err(|e| anyhow_to_syn(call_site, e))?; Ok(Config { opts, @@ -178,6 +177,43 @@ impl Parse for Config { } } +fn select_world( + resolve: &Resolve, + pkgs: &[PackageId], + world: Option<&str>, +) -> anyhow::Result { + if pkgs.len() == 1 { + resolve.select_world(pkgs[0], world) + } else { + assert!(!pkgs.is_empty()); + match world { + Some(name) => { + if !name.contains(":") { + anyhow::bail!( + "with multiple packages a fully qualified \ + world name must be specified" + ) + } + + // This will ignore the package argument due to the fully + // qualified name being used. + resolve.select_world(pkgs[0], world) + } + None => { + let worlds = pkgs + .iter() + .filter_map(|p| resolve.select_world(*p, None).ok()) + .collect::>(); + match &worlds[..] { + [] => anyhow::bail!("no packages have a world"), + [world] => Ok(*world), + _ => anyhow::bail!("multiple packages have a world, must specify which to use"), + } + } + } + } +} + /// Parse the source fn parse_source( source: &Option, @@ -199,7 +235,7 @@ fn parse_source( Err(_) => p.to_path_buf(), }; let (pkg, sources) = resolve.push_path(normalized_path)?; - pkgs.extend(pkg); + pkgs.push(pkg); files.extend(sources); } Ok(()) @@ -209,7 +245,7 @@ fn parse_source( if let Some(p) = path { parse(p)?; } - pkgs = resolve.push_group(UnresolvedPackageGroup::parse("macro-input", s)?)?; + pkgs.push(resolve.push_group(UnresolvedPackageGroup::parse("macro-input", s)?)?); } Some(Source::Paths(p)) => parse(p)?, None => parse(&vec![root.join("wit")])?, diff --git a/crates/rust/tests/codegen.rs b/crates/rust/tests/codegen.rs index bc0dbed4b..f68491f5d 100644 --- a/crates/rust/tests/codegen.rs +++ b/crates/rust/tests/codegen.rs @@ -494,7 +494,7 @@ mod generate_unused_types { mod gated_features { wit_bindgen::generate!({ inline: r#" - package foo:bar; + package foo:bar@1.2.3; world bindings { @unstable(feature = x) @@ -519,10 +519,10 @@ mod simple_with_option { mod a { wit_bindgen::generate!({ inline: r#" - package foo:bar { - interface a { - x: func(); - } + package foo:bar; + + interface a { + x: func(); } package foo:baz { @@ -539,10 +539,10 @@ mod simple_with_option { mod b { wit_bindgen::generate!({ inline: r#" - package foo:bar { - interface a { - x: func(); - } + package foo:bar; + + interface a { + x: func(); } package foo:baz { diff --git a/crates/rust/tests/codegen_no_std.rs b/crates/rust/tests/codegen_no_std.rs index a2665f6ef..6c2db154d 100644 --- a/crates/rust/tests/codegen_no_std.rs +++ b/crates/rust/tests/codegen_no_std.rs @@ -6,10 +6,6 @@ #![allow(unused_macros)] #![allow(dead_code, unused_variables)] -// This test expects `"std"` to be absent. -#[cfg(feature = "std")] -fn std_enabled() -> CompileError; - extern crate alloc; mod codegen_tests { diff --git a/crates/test-helpers/src/lib.rs b/crates/test-helpers/src/lib.rs index 392ec23e3..32ea36bc5 100644 --- a/crates/test-helpers/src/lib.rs +++ b/crates/test-helpers/src/lib.rs @@ -1,6 +1,4 @@ pub use codegen_macro::*; -#[cfg(feature = "runtime-macro")] -pub use runtime_macro::*; use std::fs; use std::path::{Path, PathBuf}; @@ -143,10 +141,10 @@ pub fn run_component_codegen_test( fn parse_wit(path: &Path) -> (Resolve, WorldId) { let mut resolve = Resolve::default(); - let (pkgs, _files) = resolve.push_path(path).unwrap(); - let world = resolve.select_world(&pkgs, None).unwrap_or_else(|_| { + let (pkg, _files) = resolve.push_path(path).unwrap(); + let world = resolve.select_world(pkg, None).unwrap_or_else(|_| { // note: if there are multiples worlds in the wit package, we assume the "imports" world - resolve.select_world(&pkgs, Some("imports")).unwrap() + resolve.select_world(pkg, Some("imports")).unwrap() }); (resolve, world) } diff --git a/tests/runtime/main.rs b/tests/runtime/main.rs index 97df5df4e..afbabd486 100644 --- a/tests/runtime/main.rs +++ b/tests/runtime/main.rs @@ -861,7 +861,7 @@ fn tests(name: &str, dir_name: &str) -> Result> { #[allow(dead_code)] // not used by all generators fn resolve_wit_dir(dir: &PathBuf) -> (Resolve, WorldId) { let mut resolve = Resolve::new(); - let (pkgs, _files) = resolve.push_path(dir).unwrap(); - let world = resolve.select_world(&pkgs, None).unwrap(); + let (pkg, _files) = resolve.push_path(dir).unwrap(); + let world = resolve.select_world(pkg, None).unwrap(); (resolve, world) }