diff --git a/.gitignore b/.gitignore index 8c4430c..237ffe1 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ examples/http/.spin examples/http/http.wasm examples/tcp/tcp.wasm examples/cli/cli.wasm +examples/sandbox/sandbox +examples/sandbox/sandbox.wasm diff --git a/Cargo.lock b/Cargo.lock index ef6edf7..d2d40b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -31,9 +31,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -55,47 +55,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -103,9 +104,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" dependencies = [ "backtrace", ] @@ -118,9 +119,9 @@ checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" [[package]] name = "async-trait" -version = "0.1.78" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", @@ -129,15 +130,15 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -180,15 +181,9 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bitflags" -version = "1.3.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitmaps" @@ -210,9 +205,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" @@ -222,15 +217,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cap-fs-ext" -version = "2.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88e341d15ac1029aadce600be764a1a1edafe40e03cde23285bc1d261b3a4866" +checksum = "eb23061fc1c4ead4e45ca713080fe768e6234e959f5a5c399c39eb41aa34e56e" dependencies = [ "cap-primitives", "cap-std", @@ -240,9 +235,9 @@ dependencies = [ [[package]] name = "cap-net-ext" -version = "2.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434168fe6533055f0f4204039abe3ff6d7db338ef46872a5fa39e9d5ad5ab7a9" +checksum = "f83ae11f116bcbafc5327c6af250341db96b5930046732e1905f7dc65887e0e1" dependencies = [ "cap-primitives", "cap-std", @@ -252,9 +247,9 @@ dependencies = [ [[package]] name = "cap-primitives" -version = "2.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe16767ed8eee6d3f1f00d6a7576b81c226ab917eb54b96e5f77a5216ef67abb" +checksum = "6d00bd8d26c4270d950eaaa837387964a2089a1c3c349a690a1fa03221d29531" dependencies = [ "ambient-authority", "fs-set-times", @@ -269,9 +264,9 @@ dependencies = [ [[package]] name = "cap-rand" -version = "2.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20e5695565f0cd7106bc3c7170323597540e772bb73e0be2cd2c662a0f8fa4ca" +checksum = "dbcb16a619d8b8211ed61f42bd290d2a1ac71277a69cf8417ec0996fa92f5211" dependencies = [ "ambient-authority", "rand", @@ -279,9 +274,9 @@ dependencies = [ [[package]] name = "cap-std" -version = "2.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "593db20e4c51f62d3284bae7ee718849c3214f93a3b94ea1899ad85ba119d330" +checksum = "19eb8e3d71996828751c1ed3908a439639752ac6bdc874e41469ef7fc15fbd7f" dependencies = [ "cap-primitives", "io-extras", @@ -291,9 +286,9 @@ dependencies = [ [[package]] name = "cap-time-ext" -version = "2.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03261630f291f425430a36f38c847828265bc928f517cdd2004c56f4b02f002b" +checksum = "61142dc51e25b7acc970ca578ce2c3695eac22bbba46c1073f5f583e78957725" dependencies = [ "ambient-authority", "cap-primitives", @@ -305,12 +300,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.90" +version = "1.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "e9d013ecb737093c0e86b151a7b837993cf9ec6c502946cfb44bedc392421e0b" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -321,9 +317,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.5.3" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" +checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" dependencies = [ "clap_builder", "clap_derive", @@ -331,9 +327,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" dependencies = [ "anstream", "anstyle", @@ -343,9 +339,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.3" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -355,32 +351,38 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" + +[[package]] +name = "cobs" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "component-init" version = "0.1.0" -source = "git+https://github.com/dicej/component-init?rev=70d4523b#70d4523bbb5a3fbc14af3e2845ae4028a9e860b8" +source = "git+https://github.com/dicej/component-init?rev=bc276826#bc27682684774f7ea192d73e511f4ccb636c3ba3" dependencies = [ "anyhow", "async-trait", "futures", "wasm-convert", - "wasm-encoder 0.201.0 (git+https://github.com/dicej/wasm-tools?branch=adapt-world-imports)", - "wasmparser 0.201.0", + "wasm-encoder 0.216.0", + "wasmparser 0.216.0", ] [[package]] name = "componentize-py" -version = "0.13.5" +version = "0.14.0" dependencies = [ "anyhow", "async-trait", @@ -391,11 +393,10 @@ dependencies = [ "component-init", "componentize-py-shared", "futures", - "heck 0.4.1", + "heck 0.5.0", "hex", "im-rc", "indexmap", - "isyswasfa-transform 0.1.0 (git+https://github.com/dicej/isyswasfa-transform?rev=db4fb62d)", "once_cell", "pretty_env_logger", "proptest", @@ -406,16 +407,16 @@ dependencies = [ "tempfile", "test-generator", "tokio", - "toml 0.8.12", + "toml", "wasi-common", "wasm-convert", - "wasm-encoder 0.201.0 (git+https://github.com/dicej/wasm-tools?branch=adapt-world-imports)", - "wasmparser 0.201.0", + "wasm-encoder 0.216.0", + "wasmparser 0.216.0", "wasmtime", "wasmtime-wasi", - "wit-component 0.201.0", - "wit-parser 0.201.0", - "zstd 0.13.0", + "wit-component 0.216.0", + "wit-parser 0.216.0", + "zstd", ] [[package]] @@ -436,90 +437,110 @@ version = "0.1.0" [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpp_demangle" -version = "0.3.5" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" +checksum = "96e58d342ad113c2b878f16d5d034c03be492ae460cdbc02b7f0f2284d310c7d" dependencies = [ "cfg-if", ] [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.105.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b80c3a50b9c4c7e5b5f73c0ed746687774fc9e36ef652b110da8daebf0c6e0e6" dependencies = [ "cranelift-entity", ] +[[package]] +name = "cranelift-bitset" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38778758c2ca918b05acb2199134e0c561fb577c50574259b26190b6c2d95ded" +dependencies = [ + "serde", + "serde_derive", +] + [[package]] name = "cranelift-codegen" -version = "0.105.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58258667ad10e468bfc13a8d620f50dfcd4bb35d668123e97defa2549b9ad397" dependencies = [ "bumpalo", "cranelift-bforest", + "cranelift-bitset", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-control", "cranelift-entity", "cranelift-isle", "gimli", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "log", "regalloc2", + "rustc-hash", "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.105.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043f0b702e529dcb07ff92bd7d40e7d5317b5493595172c5eb0983343751ee06" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.105.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7763578888ab53eca5ce7da141953f828e82c2bfadcffc106d10d1866094ffbb" [[package]] name = "cranelift-control" -version = "0.105.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32db15f08c05df570f11e8ab33cb1ec449a64b37c8a3498377b77650bef33d8b" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.105.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5289cdb399381a27e7bbfa1b42185916007c3d49aeef70b1d01cb4caa8010130" dependencies = [ + "cranelift-bitset", "serde", "serde_derive", ] [[package]] name = "cranelift-frontend" -version = "0.105.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31ba8ab24eb9470477e98ddfa3c799a649ac5a0d9a2042868c4c952133c234e8" dependencies = [ "cranelift-codegen", "log", @@ -529,13 +550,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.105.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b72a3c5c166a70426dcb209bdd0bb71a787c1ea76023dc0974fbabca770e8f9" [[package]] name = "cranelift-native" -version = "0.105.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a42424c956bbc31fc5c2706073df896156c5420ae8fa2a5d48dbc7b295d71b" dependencies = [ "cranelift-codegen", "libc", @@ -544,8 +567,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.105.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49778df4289933d735b93c30a345513e030cf83101de0036e19b760f8aa09f68" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -553,15 +577,15 @@ dependencies = [ "itertools", "log", "smallvec", - "wasmparser 0.120.0", + "wasmparser 0.215.0", "wasmtime-types", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -587,9 +611,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crypto-common" @@ -663,15 +687,27 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -697,9 +733,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -713,9 +749,9 @@ checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fd-lock" @@ -730,14 +766,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] @@ -870,7 +906,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" dependencies = [ - "bitflags 2.5.0", + "bitflags", "debugid", "fxhash", "serde", @@ -889,9 +925,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -900,9 +936,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" dependencies = [ "fallible-iterator", "indexmap", @@ -920,11 +956,12 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", + "serde", ] [[package]] @@ -948,6 +985,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -1015,26 +1058,26 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "serde", ] [[package]] name = "indoc" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "io-extras" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c301e73fb90e8a29e600a9f402d095765f74310d582916a952f618836a1bd1ed" +checksum = "c9f046b9af244f13b3bd939f55d16830ac3a201e8a9ba9661bfcb03e2be72b9b" dependencies = [ "io-lifetimes", "windows-sys 0.52.0", @@ -1054,45 +1097,35 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] [[package]] -name = "isyswasfa-transform" -version = "0.1.0" -source = "git+https://github.com/dicej/isyswasfa-transform?rev=db4fb62d#db4fb62de494f96cb68daf081d02e36ae32354fa" -dependencies = [ - "wit-parser 0.201.0", -] - -[[package]] -name = "isyswasfa-transform" -version = "0.1.0" -source = "git+https://github.com/dicej/isyswasfa-transform#db4fb62de494f96cb68daf081d02e36ae32354fa" -dependencies = [ - "wit-parser 0.201.0", -] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" -version = "0.10.5" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "ittapi" @@ -1116,27 +1149,27 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.28" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "leb128" @@ -1146,9 +1179,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libm" @@ -1158,26 +1191,26 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags", "libc", "redox_syscall", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1185,15 +1218,15 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] -name = "mach" -version = "0.3.2" +name = "mach2" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" dependencies = [ "libc", ] @@ -1206,9 +1239,9 @@ checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memfd" @@ -1221,40 +1254,40 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -1270,32 +1303,22 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "object" -version = "0.32.2" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "crc32fast", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "indexmap", "memchr", ] @@ -1308,9 +1331,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1318,22 +1341,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "percent-encoding" @@ -1343,9 +1366,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1361,15 +1384,30 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" + +[[package]] +name = "postcard" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "5f7f0a8d620d71c457dd1d47df76bb18960378da56af4527aaa10f515eee732e" +dependencies = [ + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "serde", +] [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "pretty_env_logger" @@ -1383,22 +1421,22 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.5.0", + "bitflags", "lazy_static", "num-traits", "rand", @@ -1412,9 +1450,9 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205" dependencies = [ "cc", ] @@ -1491,9 +1529,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1548,9 +1586,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -1568,18 +1606,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", @@ -1601,9 +1639,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -1613,9 +1651,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -1624,15 +1662,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -1642,11 +1680,11 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" dependencies = [ - "bitflags 2.5.0", + "bitflags", "errno", "itoa", "libc", @@ -1669,9 +1707,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "scopeguard" @@ -1681,24 +1719,27 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] [[package]] name = "serde" -version = "1.0.197" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", @@ -1707,20 +1748,21 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -1745,6 +1787,12 @@ dependencies = [ "dirs", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "sized-chunks" version = "0.6.5" @@ -1772,15 +1820,18 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1788,9 +1839,9 @@ dependencies = [ [[package]] name = "spdx" -version = "0.10.4" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ef1a0fa1e39ac22972c8db23ff89aea700ab96aa87114e1fb55937a631a0c9" +checksum = "47317bbaf63785b53861e1ae2d11b80d6b624211d42cb20efcd210ee6f8a14bc" dependencies = [ "smallvec", ] @@ -1809,15 +1860,15 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.53" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -1826,11 +1877,11 @@ dependencies = [ [[package]] name = "system-interface" -version = "0.26.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0682e006dd35771e392a6623ac180999a9a854b1d4a6c12fb2e804941c2b1f58" +checksum = "b858526d22750088a9b3cf2e3c2aacebd5377f13adeec02860c30d09113010a6" dependencies = [ - "bitflags 2.5.0", + "bitflags", "cap-fs-ext", "cap-std", "fd-lock", @@ -1842,9 +1893,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -1853,20 +1904,21 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1890,18 +1942,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -1910,9 +1962,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -1925,26 +1977,25 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", @@ -1953,18 +2004,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml" -version = "0.8.12" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -1974,18 +2016,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.8" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "serde", @@ -2067,15 +2109,15 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "unindent" @@ -2085,9 +2127,9 @@ checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -2096,21 +2138,21 @@ dependencies = [ [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +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 = "wait-timeout" @@ -2128,12 +2170,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wasi-cap-std-sync" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +name = "wasi-common" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7336747832c6fe1086c81ef38b63dfeaeec48fc1b7c33a88fd16115cc940d178" dependencies = [ "anyhow", - "async-trait", + "bitflags", "cap-fs-ext", "cap-rand", "cap-std", @@ -2141,26 +2184,10 @@ dependencies = [ "fs-set-times", "io-extras", "io-lifetimes", + "log", "once_cell", "rustix", "system-interface", - "tracing", - "wasi-common", - "windows-sys 0.52.0", -] - -[[package]] -name = "wasi-common" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" -dependencies = [ - "anyhow", - "bitflags 2.5.0", - "cap-rand", - "cap-std", - "io-extras", - "log", - "rustix", "thiserror", "tracing", "wasmtime", @@ -2170,19 +2197,20 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", @@ -2195,9 +2223,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2205,9 +2233,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", @@ -2218,17 +2246,17 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-convert" version = "0.1.0" -source = "git+https://github.com/dicej/wasm-convert?rev=f4cb9b22#f4cb9b224b3e3f7799d84c031075982babbbc81d" +source = "git+https://github.com/dicej/wasm-convert?rev=afbec48b#afbec48bf992946d34ead239c9be19a9d61772f2" dependencies = [ - "wasm-encoder 0.201.0 (git+https://github.com/dicej/wasm-tools?branch=adapt-world-imports)", - "wasmparser 0.201.0", + "wasm-encoder 0.216.0", + "wasmparser 0.216.0", ] [[package]] @@ -2240,15 +2268,6 @@ dependencies = [ "leb128", ] -[[package]] -name = "wasm-encoder" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d162eb64168969ae90e8668ca0593b0e47667e315aa08e717a9c9574d700d826" -dependencies = [ - "leb128", -] - [[package]] name = "wasm-encoder" version = "0.41.2" @@ -2260,19 +2279,21 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.201.0" +version = "0.215.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9c7d2731df60006819b013f64ccc2019691deccf6e11a1804bc850cd6748f1a" +checksum = "4fb56df3e06b8e6b77e37d2969a50ba51281029a9aeb3855e76b7f49b6418847" dependencies = [ "leb128", ] [[package]] name = "wasm-encoder" -version = "0.201.0" -source = "git+https://github.com/dicej/wasm-tools?branch=adapt-world-imports#a3e308dbe3b1555c7873ce199adf81e76ea01224" +version = "0.216.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04c23aebea22c8a75833ae08ed31ccc020835b12a41999e58c31464271b94a88" dependencies = [ "leb128", + "wasmparser 0.216.0", ] [[package]] @@ -2293,8 +2314,9 @@ dependencies = [ [[package]] name = "wasm-metadata" -version = "0.201.0" -source = "git+https://github.com/dicej/wasm-tools?branch=adapt-world-imports#a3e308dbe3b1555c7873ce199adf81e76ea01224" +version = "0.216.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c8154d703a6b0e45acf6bd172fa002fc3c7058a9f7615e517220aeca27c638" dependencies = [ "anyhow", "indexmap", @@ -2302,8 +2324,8 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.201.0 (git+https://github.com/dicej/wasm-tools?branch=adapt-world-imports)", - "wasmparser 0.201.0", + "wasm-encoder 0.216.0", + "wasmparser 0.216.0", ] [[package]] @@ -2318,75 +2340,95 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.120.0" +version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9148127f39cbffe43efee8d5442b16ecdba21567785268daa1ec9e134389705" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ - "bitflags 2.5.0", + "bitflags", "indexmap", "semver", ] [[package]] name = "wasmparser" -version = "0.121.2" +version = "0.215.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" +checksum = "53fbde0881f24199b81cf49b6ff8f9c145ac8eb1b7fc439adb5c099734f7d90e" dependencies = [ - "bitflags 2.5.0", + "ahash", + "bitflags", + "hashbrown 0.14.5", "indexmap", "semver", + "serde", ] [[package]] name = "wasmparser" -version = "0.201.0" -source = "git+https://github.com/dicej/wasm-tools?branch=adapt-world-imports#a3e308dbe3b1555c7873ce199adf81e76ea01224" +version = "0.216.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcdee6bea3619d311fb4b299721e89a986c3470f804b6d534340e412589028e3" dependencies = [ - "bitflags 2.5.0", + "ahash", + "bitflags", + "hashbrown 0.14.5", "indexmap", "semver", + "serde", ] [[package]] name = "wasmprinter" -version = "0.2.80" +version = "0.215.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e73986a6b7fdfedb7c5bf9e7eb71135486507c8fbc4c0c42cffcb6532988b7" +checksum = "d8e9a325d85053408209b3d2ce5eaddd0dd6864d1cff7a007147ba073157defc" dependencies = [ "anyhow", - "wasmparser 0.121.2", + "termcolor", + "wasmparser 0.215.0", ] [[package]] name = "wasmtime" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a5883d64dfc8423c56e3d8df27cffc44db25336aa468e8e0724fddf30a333d7" dependencies = [ "addr2line", "anyhow", "async-trait", - "bincode", + "bitflags", "bumpalo", + "cc", "cfg-if", "encoding_rs", "fxprof-processed-profile", "gimli", + "hashbrown 0.14.5", "indexmap", "ittapi", "libc", + "libm", "log", + "mach2", + "memfd", "object", "once_cell", "paste", + "postcard", + "psm", "rayon", "rustix", + "semver", "serde", "serde_derive", "serde_json", + "smallvec", + "sptr", "target-lexicon", - "wasm-encoder 0.40.0", - "wasmparser 0.120.0", + "wasm-encoder 0.215.0", + "wasmparser 0.215.0", + "wasmtime-asm-macros", "wasmtime-cache", "wasmtime-component-macro", "wasmtime-component-util", @@ -2395,7 +2437,8 @@ dependencies = [ "wasmtime-fiber", "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", - "wasmtime-runtime", + "wasmtime-slab", + "wasmtime-versioned-export-macros", "wasmtime-winch", "wat", "windows-sys 0.52.0", @@ -2403,55 +2446,59 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4dc7e2a379c0dd6be5b55857d14c4b277f43a9c429a9e14403eb61776ae3be" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a5b179f263a318e08c93281ea77cbb95e2a0c8c11e99a6188b53ead77233722" dependencies = [ "anyhow", "base64", - "bincode", "directories-next", "log", + "postcard", "rustix", "serde", "serde_derive", "sha2", - "toml 0.5.11", + "toml", "windows-sys 0.52.0", - "zstd 0.11.2+zstd.1.5.2", + "zstd", ] [[package]] name = "wasmtime-component-macro" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b07773d1c3dab5f014ec61316ee317aa424033e17e70a63abdf7c3a47e58fcf" dependencies = [ "anyhow", - "isyswasfa-transform 0.1.0 (git+https://github.com/dicej/isyswasfa-transform)", "proc-macro2", "quote", "syn", "wasmtime-component-util", "wasmtime-wit-bindgen", - "wit-parser 0.201.0", + "wit-parser 0.215.0", ] [[package]] name = "wasmtime-component-util" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e38d735320f4e83478369ce649ad8fe87c6b893220902e798547a225fc0c5874" [[package]] name = "wasmtime-cranelift" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e570d831d0785d93d7d8c722b1eb9a34e0d0c1534317666f65892818358a2da9" dependencies = [ "anyhow", "cfg-if", @@ -2466,47 +2513,33 @@ dependencies = [ "object", "target-lexicon", "thiserror", - "wasmparser 0.120.0", - "wasmtime-cranelift-shared", + "wasmparser 0.215.0", "wasmtime-environ", "wasmtime-versioned-export-macros", ] -[[package]] -name = "wasmtime-cranelift-shared" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" -dependencies = [ - "anyhow", - "cranelift-codegen", - "cranelift-control", - "cranelift-native", - "gimli", - "object", - "target-lexicon", - "wasmtime-environ", -] - [[package]] name = "wasmtime-environ" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5fe80dfbd81687431a7d4f25929fae1ae96894786d5c96b14ae41164ee97377" dependencies = [ "anyhow", - "bincode", "cpp_demangle", + "cranelift-bitset", "cranelift-entity", "gimli", "indexmap", "log", "object", + "postcard", "rustc-demangle", + "semver", "serde", "serde_derive", "target-lexicon", - "thiserror", - "wasm-encoder 0.40.0", - "wasmparser 0.120.0", + "wasm-encoder 0.215.0", + "wasmparser 0.215.0", "wasmprinter", "wasmtime-component-util", "wasmtime-types", @@ -2514,8 +2547,9 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f39043d13c7b58db69dc9a0feb191a961e75a9ec2402aebf42de183c022bb8a" dependencies = [ "anyhow", "cc", @@ -2528,8 +2562,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aec346412363eb26067cb6473281a45bd273cbbcafa3dc862793c946eff6ba7f" dependencies = [ "object", "once_cell", @@ -2539,59 +2574,41 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15de8429db996f0d17a4163a35eccc3f874cbfb50f29c379951ea1bbb39452e" dependencies = [ + "anyhow", "cfg-if", "libc", "windows-sys 0.52.0", ] [[package]] -name = "wasmtime-runtime" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" -dependencies = [ - "anyhow", - "cc", - "cfg-if", - "encoding_rs", - "indexmap", - "libc", - "log", - "mach", - "memfd", - "memoffset", - "paste", - "psm", - "rustix", - "sptr", - "wasm-encoder 0.40.0", - "wasmtime-asm-macros", - "wasmtime-environ", - "wasmtime-fiber", - "wasmtime-jit-debug", - "wasmtime-versioned-export-macros", - "wasmtime-wmemcheck", - "windows-sys 0.52.0", -] +name = "wasmtime-slab" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f68d38fa6b30c5e1fc7d608263062997306f79e577ebd197ddcd6b0f55d87d1" [[package]] name = "wasmtime-types" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6634e7079d9c5cfc81af8610ed59b488cc5b7f9777a2f4c1667a2565c2e45249" dependencies = [ + "anyhow", "cranelift-entity", "serde", "serde_derive", - "thiserror", - "wasmparser 0.120.0", + "smallvec", + "wasmparser 0.215.0", ] [[package]] name = "wasmtime-versioned-export-macros" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3850e3511d6c7f11a72d571890b0ed5f6204681f7f050b9de2690e7f13123fed" dependencies = [ "proc-macro2", "quote", @@ -2600,12 +2617,13 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "545ae8298ffce025604f7480f9c7d6948c985bef7ce9aee249ef79307813e83c" dependencies = [ "anyhow", "async-trait", - "bitflags 2.5.0", + "bitflags", "bytes", "cap-fs-ext", "cap-net-ext", @@ -2616,8 +2634,6 @@ dependencies = [ "futures", "io-extras", "io-lifetimes", - "libc", - "log", "once_cell", "rustix", "system-interface", @@ -2625,8 +2641,6 @@ dependencies = [ "tokio", "tracing", "url", - "wasi-cap-std-sync", - "wasi-common", "wasmtime", "wiggle", "windows-sys 0.52.0", @@ -2634,36 +2648,33 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a25199625effa4c13dd790d64bd56884b014c69829431bfe43991c740bd5bc1" dependencies = [ "anyhow", "cranelift-codegen", "gimli", "object", "target-lexicon", - "wasmparser 0.120.0", - "wasmtime-cranelift-shared", + "wasmparser 0.215.0", + "wasmtime-cranelift", "wasmtime-environ", "winch-codegen", ] [[package]] name = "wasmtime-wit-bindgen" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cb331ac7ed1d5ba49cddcdb6b11973752a857148858bb308777d2fc5584121f" dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wit-parser 0.201.0", + "wit-parser 0.215.0", ] -[[package]] -name = "wasmtime-wmemcheck" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" - [[package]] name = "wast" version = "35.0.2" @@ -2675,34 +2686,35 @@ dependencies = [ [[package]] name = "wast" -version = "201.0.0" +version = "216.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef6e1ef34d7da3e2b374fd2b1a9c0227aff6cad596e1b24df9b58d0f6222faa" +checksum = "f7eb1f2eecd913fdde0dc6c3439d0f24530a98ac6db6cb3d14d92a5328554a08" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.201.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-encoder 0.216.0", ] [[package]] name = "wat" -version = "1.201.0" +version = "1.216.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453d5b37a45b98dee4f4cb68015fc73634d7883bbef1c65e6e9c78d454cf3f32" +checksum = "ac0409090fb5154f95fb5ba3235675fd9e579e731524d63b6a2f653e1280c82a" dependencies = [ - "wast 201.0.0", + "wast 216.0.0", ] [[package]] name = "wiggle" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc850ca3c02c5835934d23f28cec4c5a3fb66fe0b4ecd968bbb35609dda5ddc0" dependencies = [ "anyhow", "async-trait", - "bitflags 2.5.0", + "bitflags", "thiserror", "tracing", "wasmtime", @@ -2711,8 +2723,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634b8804a67200bcb43ea8af5f7c53e862439a086b68b16fd333454bc74d5aab" dependencies = [ "anyhow", "heck 0.4.1", @@ -2725,8 +2738,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "18.0.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "474b7cbdb942c74031e619d66c600bba7f73867c5800fc2c2306cf307649be2f" dependencies = [ "proc-macro2", "quote", @@ -2752,11 +2766,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -2767,8 +2781,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.16.0" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "073efe897d9ead7fc609874f94580afc831114af5149b6a90ee0a3a39b497fe0" dependencies = [ "anyhow", "cranelift-codegen", @@ -2776,7 +2791,8 @@ dependencies = [ "regalloc2", "smallvec", "target-lexicon", - "wasmparser 0.120.0", + "wasmparser 0.215.0", + "wasmtime-cranelift", "wasmtime-environ", ] @@ -2786,16 +2802,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", -] - -[[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]] @@ -2804,128 +2811,87 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 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]] name = "windows-targets" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "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.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] -name = "windows_i686_gnu" -version = "0.52.4" +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.5" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -2936,7 +2902,7 @@ version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9643b83820c0cd246ecabe5fa454dd04ba4fa67996369466d0747472d337346" dependencies = [ - "bitflags 2.5.0", + "bitflags", "windows-sys 0.52.0", ] @@ -2946,7 +2912,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b76f1d099678b4f69402a421e888bbe71bf20320c2f3f3565d0e7484dbe5bc20" dependencies = [ - "bitflags 2.5.0", + "bitflags", "wit-bindgen-rust-macro", ] @@ -2996,7 +2962,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a35a2a9992898c9d27f1664001860595a4bc99d32dd3599d547412e17d7e2" dependencies = [ "anyhow", - "bitflags 2.5.0", + "bitflags", "indexmap", "log", "serde", @@ -3010,20 +2976,21 @@ dependencies = [ [[package]] name = "wit-component" -version = "0.201.0" -source = "git+https://github.com/dicej/wasm-tools?branch=adapt-world-imports#a3e308dbe3b1555c7873ce199adf81e76ea01224" +version = "0.216.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e2ca3ece38ea2447a9069b43074ba73d96dde1944cba276c54e41371745f9dc" dependencies = [ "anyhow", - "bitflags 2.5.0", + "bitflags", "indexmap", "log", "serde", "serde_derive", "serde_json", - "wasm-encoder 0.201.0 (git+https://github.com/dicej/wasm-tools?branch=adapt-world-imports)", - "wasm-metadata 0.201.0", - "wasmparser 0.201.0", - "wit-parser 0.201.0", + "wasm-encoder 0.216.0", + "wasm-metadata 0.216.0", + "wasmparser 0.216.0", + "wit-parser 0.216.0", ] [[package]] @@ -3045,8 +3012,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.201.0" -source = "git+https://github.com/dicej/wasm-tools?branch=adapt-world-imports#a3e308dbe3b1555c7873ce199adf81e76ea01224" +version = "0.215.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "935a97eaffd57c3b413aa510f8f0b550a4a9fe7d59e79cd8b89a83dcb860321f" dependencies = [ "anyhow", "id-arena", @@ -3057,13 +3025,32 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.201.0", + "wasmparser 0.215.0", +] + +[[package]] +name = "wit-parser" +version = "0.216.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4d108165c1167a4ccc8a803dcf5c28e0a51d6739fd228cc7adce768632c764c" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.216.0", ] [[package]] name = "witx" version = "0.9.1" -source = "git+https://github.com/dicej/wasmtime?branch=isyswasfa#aa4b5c04916d8091c16bf8334df36664a873dc3f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b" dependencies = [ "anyhow", "log", @@ -3084,18 +3071,19 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", @@ -3104,46 +3092,27 @@ dependencies = [ [[package]] name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe 5.0.2+zstd.1.5.2", -] - -[[package]] -name = "zstd" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" -dependencies = [ - "zstd-safe 7.0.0", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "libc", - "zstd-sys", + "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.0.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index c91d863..0d27fc5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "componentize-py" -version = "0.13.5" +version = "0.14.0" edition = "2021" exclude = ["cpython"] @@ -9,59 +9,55 @@ name = "componentize_py" crate-type = ["cdylib", "rlib"] [dependencies] -anyhow = { version = "1.0.75", features = ["backtrace"] } -clap = { version = "4.4.10", features = ["derive"] } -tar = "0.4.40" -tempfile = "3.8.1" -zstd = "0.13.0" +anyhow = { version = "1.0.86", features = ["backtrace"] } +clap = { version = "4.5.17", features = ["derive"] } +tar = "0.4.41" +tempfile = "3.12.0" +zstd = "0.13.2" componentize-py-shared = { path = "shared" } -# TODO: switch to upstream release versions of these deps once -# https://github.com/bytecodealliance/wasm-tools/pull/1459 is merged and -# released: -wasm-encoder = { git = "https://github.com/dicej/wasm-tools", branch = "adapt-world-imports" } -wit-parser = { git = "https://github.com/dicej/wasm-tools", branch = "adapt-world-imports" } -wit-component = { git = "https://github.com/dicej/wasm-tools", branch = "adapt-world-imports" } -wasmparser = { git = "https://github.com/dicej/wasm-tools", branch = "adapt-world-imports" } -indexmap = "2.1.0" +wasm-encoder = "0.216.0" +wit-parser = "0.216.0" +wit-component = "0.216.0" +wasmparser = "0.216.0" +indexmap = "2.5.0" bincode = "1.3.3" -heck = "0.4.1" -pyo3 = { version = "0.20.0", features = ["abi3-py37", "extension-module"], optional = true } -# TODO: switch to upstream release versions of these deps once -# https://github.com/bytecodealliance/wasm-tools/pull/1459 is merged and -# released, and Wasmtime has adopted those releases: -wasmtime = { git = "https://github.com/dicej/wasmtime", branch = "isyswasfa", features = ["component-model"] } -wasmtime-wasi = { git = "https://github.com/dicej/wasmtime", branch = "isyswasfa" } -wasi-common = { git = "https://github.com/dicej/wasmtime", branch = "isyswasfa" } -once_cell = "1.18.0" -component-init = { git = "https://github.com/dicej/component-init", rev = "70d4523b" } -wasm-convert = { git = "https://github.com/dicej/wasm-convert", rev = "f4cb9b22" } -async-trait = "0.1.74" -futures = "0.3.29" -tokio = { version = "1.34.0", features = ["macros", "rt", "rt-multi-thread", "fs"] } -bytes = "1.5.0" +heck = "0.5.0" +pyo3 = { version = "0.20.0", features = [ + "abi3-py37", + "extension-module", +], optional = true } +wasmtime = "24.0.0" +wasmtime-wasi = "24.0.0" +wasi-common = "24.0.0" +once_cell = "1.19.0" +component-init = { git = "https://github.com/dicej/component-init", rev = "bc276826" } +wasm-convert = { git = "https://github.com/dicej/wasm-convert", rev = "afbec48b" } +async-trait = "0.1.82" +futures = "0.3.30" +tokio = { version = "1.40.0", features = [ + "macros", + "rt", + "rt-multi-thread", + "fs", +] } +bytes = "1.7.1" pretty_env_logger = "0.5.0" -cap-std = "2.0.0" +cap-std = "3.2.0" im-rc = "15.1.0" -serde = { version = "1.0.193", features = ["derive"] } -toml = "0.8.8" -isyswasfa-transform = { git = "https://github.com/dicej/isyswasfa-transform", rev = "db4fb62d" } -semver = "1.0.22" +serde = { version = "1.0.209", features = ["derive"] } +toml = "0.8.19" +semver = "1.0.23" [dev-dependencies] -async-trait = "0.1.74" -once_cell = "1.18.0" -proptest = "1.4.0" +async-trait = "0.1.82" +proptest = "1.5.0" hex = "0.4.3" [build-dependencies] -anyhow = "1.0.75" -tar = "0.4.40" -zstd = "0.13.0" +anyhow = "1.0.86" +tar = "0.4.41" +zstd = "0.13.2" test-generator = { path = "test-generator" } [workspace] -members = [ - "runtime", - "shared", - "test-generator", -] +members = ["runtime", "shared", "test-generator"] diff --git a/bundled/isyswasfa_guest/__init__.py b/bundled/isyswasfa_guest/__init__.py deleted file mode 100644 index a031dc3..0000000 --- a/bundled/isyswasfa_guest/__init__.py +++ /dev/null @@ -1,430 +0,0 @@ -import asyncio -import socket -import subprocess -from dataclasses import dataclass -from typing import Any, Union, Optional -from contextvars import ContextVar, Context - -from proxy.types import Result, Ok, Err -from proxy.imports import isyswasfa -from proxy.imports.isyswasfa import ( - PollInput, PollInput_Ready, PollInputReady, PollInput_Listening, PollOutput, PollOutput_Listen, - PollOutputListen, PollOutput_Pending, PollOutputPending, PollOutput_Ready, PollOutputReady, Ready, Pending, - Cancel -) - -_future_state: ContextVar[int] = ContextVar("_future_state") - -class _Loop(asyncio.AbstractEventLoop): - def __init__(self): - self.running: bool = False - self.handles: dict[int, list[asyncio.Handle]] = {} - self.exception: Optional[Any] = None - - def poll(self, future_state: int): - while True: - handles = self.handles.pop(future_state, []) - for handle in handles: - if not handle._cancelled: - handle._run() - - if self.exception is not None: - raise self.exception - - if len(handles) == 0: - return - - def get_debug(self): - return False - - def is_running(self): - return self.running - - def is_closed(self): - return not self.running - - def stop(self): - self.running = False - - def close(self): - self.running = False - - def shutdown_asyncgens(self): - pass - - def call_exception_handler(self, context): - self.exception = context.get('exception', None) - - def call_soon(self, callback, *args, context=None): - global _pollables - - future_state = context[_future_state] - handle = asyncio.Handle(callback, args, self, context) - if self.handles.get(future_state) is None: - self.handles[future_state] = [] - self.handles[future_state].append(handle) - _pollables.add(future_state) - return handle - - def create_task(self, coroutine, context=None): - return asyncio.Task(coroutine, loop=self, context=context) # type: ignore - - def create_future(self): - return asyncio.Future(loop=self) - - # The remaining methods should be irrelevant for our purposes and thus unimplemented - - def run_until_complete(self, future): - raise NotImplementedError - - def run_forever(self): - raise NotImplementedError - - async def shutdown_default_executor(self): - raise NotImplementedError - - def _timer_handle_cancelled(self, handle): - raise NotImplementedError - - def call_later(self, delay, callback, *args, context=None): - raise NotImplementedError - - def call_at(self, when, callback, *args, context=None): - raise NotImplementedError - - def time(self): - raise NotImplementedError - - def call_soon_threadsafe(self, callback, *args, context=None): - raise NotImplementedError - - def run_in_executor(self, executor, func, *args): - raise NotImplementedError - - def set_default_executor(self, executor): - raise NotImplementedError - - async def getaddrinfo(self, host, port, *, - family=0, type=0, proto=0, flags=0): - raise NotImplementedError - - async def getnameinfo(self, sockaddr, flags=0): - raise NotImplementedError - - async def create_connection( - self, protocol_factory, host=None, port=None, - *, ssl=None, family=0, proto=0, - flags=0, sock=None, local_addr=None, - server_hostname=None, - ssl_handshake_timeout=None, - ssl_shutdown_timeout=None, - happy_eyeballs_delay=None, interleave=None): - raise NotImplementedError - - async def create_server( - self, protocol_factory, host=None, port=None, - *, family=socket.AF_UNSPEC, - flags=socket.AI_PASSIVE, sock=None, backlog=100, - ssl=None, reuse_address=None, reuse_port=None, - ssl_handshake_timeout=None, - ssl_shutdown_timeout=None, - start_serving=True): - raise NotImplementedError - - async def sendfile(self, transport, file, offset=0, count=None, - *, fallback=True): - raise NotImplementedError - - async def start_tls(self, transport, protocol, sslcontext, *, - server_side=False, - server_hostname=None, - ssl_handshake_timeout=None, - ssl_shutdown_timeout=None): - raise NotImplementedError - - async def create_unix_connection( - self, protocol_factory, path=None, *, - ssl=None, sock=None, - server_hostname=None, - ssl_handshake_timeout=None, - ssl_shutdown_timeout=None): - raise NotImplementedError - - async def create_unix_server( - self, protocol_factory, path=None, *, - sock=None, backlog=100, ssl=None, - ssl_handshake_timeout=None, - ssl_shutdown_timeout=None, - start_serving=True): - raise NotImplementedError - - async def connect_accepted_socket( - self, protocol_factory, sock, - *, ssl=None, - ssl_handshake_timeout=None, - ssl_shutdown_timeout=None): - raise NotImplementedError - - async def create_datagram_endpoint(self, protocol_factory, - local_addr=None, remote_addr=None, *, - family=0, proto=0, flags=0, - reuse_address=None, reuse_port=None, - allow_broadcast=None, sock=None): - raise NotImplementedError - - async def connect_read_pipe(self, protocol_factory, pipe): - raise NotImplementedError - - async def connect_write_pipe(self, protocol_factory, pipe): - raise NotImplementedError - - async def subprocess_shell(self, protocol_factory, cmd, *, - stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - **kwargs): - raise NotImplementedError - - async def subprocess_exec(self, protocol_factory, *args, - stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - **kwargs): - raise NotImplementedError - - def add_reader(self, fd, callback, *args): - raise NotImplementedError - - def remove_reader(self, fd): - raise NotImplementedError - - def add_writer(self, fd, callback, *args): - raise NotImplementedError - - def remove_writer(self, fd): - raise NotImplementedError - - async def sock_recv(self, sock, nbytes): - raise NotImplementedError - - async def sock_recv_into(self, sock, buf): - raise NotImplementedError - - async def sock_recvfrom(self, sock, bufsize): - raise NotImplementedError - - async def sock_recvfrom_into(self, sock, buf, nbytes=0): - raise NotImplementedError - - async def sock_sendall(self, sock, data): - raise NotImplementedError - - async def sock_sendto(self, sock, data, address): - raise NotImplementedError - - async def sock_connect(self, sock, address): - raise NotImplementedError - - async def sock_accept(self, sock): - raise NotImplementedError - - async def sock_sendfile(self, sock, file, offset=0, count=None, - *, fallback=None): - raise NotImplementedError - - def add_signal_handler(self, sig, callback, *args): - raise NotImplementedError - - def remove_signal_handler(self, sig): - raise NotImplementedError - - def set_task_factory(self, factory): - raise NotImplementedError - - def get_task_factory(self): - raise NotImplementedError - - def get_exception_handler(self): - raise NotImplementedError - - def set_exception_handler(self, handler): - raise NotImplementedError - - def default_exception_handler(self, context): - raise NotImplementedError - - def set_debug(self, enabled): - raise NotImplementedError - -@dataclass -class _FutureStatePending: - ready: Ready - future: Any - -@dataclass -class _FutureStateReady: - result: Any - -_FutureState = Union[_FutureStatePending, _FutureStateReady] - -@dataclass -class _ListenState: - future: Any - future_state: int - cancel: Optional[Cancel] - -@dataclass -class _PendingState: - pending: Pending - future: Any - -_loop = _Loop() -asyncio.set_event_loop(_loop) -_loop.running = True -asyncio.events._set_running_loop(_loop) - -_pending: list[_PendingState] = [] -_poll_output: list[PollOutput] = [] -_listen_states: dict[int, _ListenState] = {} -_next_listen_state: int = 0 -_future_states: dict[int, _FutureState] = {} -_next_future_state: int = 0 -_pollables: set[int] = set() - -def _set_future_state(future_state: int): - _future_state.set(future_state) - -def _poll_future(future: Any): - raise NotImplementedError - -def _push_listens(future_state: int): - global _pending - global _poll_output - global _next_listen_state - global _listen_states - - pending = _pending - _pending = [] - for p in pending: - # todo: wrap around at 2^32 and then skip any used slots - listen_state = _next_listen_state - _next_listen_state += 1 - _listen_states[listen_state] = _ListenState(p.future, future_state, None) - - _poll_output.append(PollOutput_Listen(PollOutputListen(listen_state, p.pending))) - -def first_poll(coroutine: Any) -> Result[Any, Any]: - return _first_poll(coroutine, True) - -def _first_poll(coroutine: Any, poll: bool) -> Result[Any, Any]: - global _loop - global _pending - global _next_future_state - global _future_states - global _poll_output - - # todo: wrap around at 2^32 and then skip any used slots - future_state = _next_future_state - _next_future_state += 1 - _future_states[future_state] = _FutureStateReady(None) - - context = Context() - context.run(_set_future_state, future_state) - future = asyncio.create_task(coroutine, context=context) - - if poll: - _loop.poll(future_state) - - if future.done(): - _pending.clear() - _future_states.pop(future_state) - _pollables.remove(future_state) - try: - return Ok(future.result()) - except Err as e: - return e - else: - pending, cancel, ready = isyswasfa.make_task() - - _future_states[future_state] = _FutureStatePending(ready, future) - - _push_listens(future_state) - _poll_output.append(PollOutput_Pending(PollOutputPending(future_state, cancel))) - - raise Err(pending) - -def get_ready(ready: Ready) -> Any: - global _future_states - - with ready as ready: - value = _future_states.pop(ready.state()) - assert isinstance(value, _FutureStateReady) - return value.result - -async def await_ready(pending: Pending) -> Ready: - global _loop - global _pending - - future = _loop.create_future() - _pending.append(_PendingState(pending, future)) - return await future - -def poll(input: list[PollInput]) -> list[PollOutput]: - global _loop - global _pending - global _pollables - global _poll_output - global _listen_states - global _future_states - - for i in input: - if isinstance(i, PollInput_Ready): - value = i.value - listen_state = _listen_states.pop(value.state) - - if listen_state.future is not None: - listen_state.future.set_result(value.ready) - listen_state.future = None - - if listen_state.cancel is not None: - listen_state.cancel.__exit__() - elif isinstance(i, PollInput_Listening): - _listen_states[i.value.state].cancel = i.value.cancel - else: - raise NotImplementedError("todo: handle cancellation") - - while True: - pollables = _pollables - _pollables = set() - - if pollables: - for future_state in pollables: - state = _future_states[future_state] - if isinstance(state, _FutureStatePending): - _loop.poll(future_state) - - if state.future.done(): - _pending.clear() - - _future_states[future_state] = _FutureStateReady(state.future.result()) - - _poll_output.append(PollOutput_Ready(PollOutputReady(future_state, state.ready))) - else: - _push_listens(future_state) - else: - poll_output = _poll_output - _poll_output = [] - return poll_output - -def spawn(coroutine: Any): - global _pending - - pending = _pending - _pending = [] - - try: - _first_poll(coroutine, False) - except Err as e: - e.value.__exit__() - - _pending = pending diff --git a/bundled/isyswasfa_guest/streams.py b/bundled/isyswasfa_guest/streams.py deleted file mode 100644 index 01d5c9e..0000000 --- a/bundled/isyswasfa_guest/streams.py +++ /dev/null @@ -1,81 +0,0 @@ -from typing import Optional - -from proxy.types import Err -from proxy.imports import isyswasfa_io_poll -from proxy.imports.streams import InputStream, OutputStream, StreamError_Closed - -# Maximum number of bytes to read at a time -_READ_SIZE: int = 64 * 1024 - -class Stream: - """Reader abstraction over `wasi:io/streams#input-stream`.""" - def __init__(self, stream: InputStream): - self.stream: Optional[InputStream] = stream - - async def next(self) -> Optional[bytes]: - """Wait for the next chunk of data to arrive on the stream. - - This will return `None` when the end of the stream has been reached. - """ - while True: - try: - if self.stream is None: - return None - else: - buffer = self.stream.read(_READ_SIZE) - if len(buffer) == 0: - with self.stream.subscribe() as pollable: - await isyswasfa_io_poll.block(pollable) - else: - return buffer - except Err as e: - if isinstance(e.value, StreamError_Closed): - self.__exit__() - else: - raise e - - def __enter__(self): - return self - - def __exit__(self, *args): - """Close the stream, indicating no further data will be read.""" - if self.stream is not None: - self.stream.__exit__() - self.stream = None - -class Sink: - """Writer abstraction over `wasi:io/streams#output-stream`.""" - def __init__(self, stream: OutputStream): - self.stream = stream - - async def send(self, chunk: bytes): - """Write the specified bytes to the sink. - - This may need to yield according to the backpressure requirements of the sink. - """ - offset = 0 - flushing = False - while True: - count = self.stream.check_write() - if count == 0: - with self.stream.subscribe() as pollable: - await isyswasfa_io_poll.block(pollable) - elif offset == len(chunk): - if flushing: - return - else: - self.stream.flush() - flushing = True - else: - count = min(count, len(chunk) - offset) - self.stream.write(chunk[offset:offset+count]) - offset += count - - def __enter__(self): - return self - - def __exit__(self, *args): - """Close the sink, indicating no further data will be written.""" - self.stream.__exit__() - - diff --git a/examples/cli/README.md b/examples/cli/README.md index 73e8a3c..2ce325f 100644 --- a/examples/cli/README.md +++ b/examples/cli/README.md @@ -10,7 +10,7 @@ run a Python-based component targetting the [wasi-cli] `command` world. ## Prerequisites * `Wasmtime` 18.0.0 or later -* `componentize-py` 0.13.5 +* `componentize-py` 0.14.0 Below, we use [Rust](https://rustup.rs/)'s `cargo` to install `Wasmtime`. If you don't have `cargo`, you can download and install from @@ -18,7 +18,7 @@ https://github.com/bytecodealliance/wasmtime/releases/tag/v18.0.0. ``` cargo install --version 18.0.0 wasmtime-cli -pip install componentize-py==0.13.5 +pip install componentize-py==0.14.0 ``` ## Running the demo diff --git a/examples/http/README.md b/examples/http/README.md index 9bc6f82..fde9468 100644 --- a/examples/http/README.md +++ b/examples/http/README.md @@ -10,7 +10,7 @@ run a Python-based component targetting the [wasi-http] `proxy` world. ## Prerequisites * `Wasmtime` 18.0.0 or later -* `componentize-py` 0.13.5 +* `componentize-py` 0.14.0 Below, we use [Rust](https://rustup.rs/)'s `cargo` to install `Wasmtime`. If you don't have `cargo`, you can download and install from @@ -18,7 +18,7 @@ https://github.com/bytecodealliance/wasmtime/releases/tag/v18.0.0. ``` cargo install --version 18.0.0 wasmtime-cli -pip install componentize-py==0.13.5 +pip install componentize-py==0.14.0 ``` ## Running the demo diff --git a/examples/matrix-math/README.md b/examples/matrix-math/README.md index 9ba71f3..f3bc086 100644 --- a/examples/matrix-math/README.md +++ b/examples/matrix-math/README.md @@ -11,7 +11,7 @@ within a guest component. ## Prerequisites * `wasmtime` 18.0.0 or later -* `componentize-py` 0.13.5 +* `componentize-py` 0.14.0 * `NumPy`, built for WASI Note that we use an unofficial build of NumPy since the upstream project does @@ -23,7 +23,7 @@ https://github.com/bytecodealliance/wasmtime/releases/tag/v18.0.0. ``` cargo install --version 18.0.0 wasmtime-cli -pip install componentize-py==0.13.5 +pip install componentize-py==0.14.0 curl -OL https://github.com/dicej/wasi-wheels/releases/download/v0.0.1/numpy-wasi.tar.gz tar xf numpy-wasi.tar.gz ``` diff --git a/examples/sandbox/README.md b/examples/sandbox/README.md index f1f3d46..d7f2771 100644 --- a/examples/sandbox/README.md +++ b/examples/sandbox/README.md @@ -8,10 +8,10 @@ sandboxed Python code snippets from within a Python app. ## Prerequisites * `wasmtime-py` 18.0.0 or later -* `componentize-py` 0.13.5 +* `componentize-py` 0.14.0 ``` -pip install componentize-py==0.13.5 wasmtime==18.0.2 +pip install componentize-py==0.14.0 wasmtime==18.0.2 ``` ## Running the demo diff --git a/examples/tcp/README.md b/examples/tcp/README.md index c3e2c31..57f6c3f 100644 --- a/examples/tcp/README.md +++ b/examples/tcp/README.md @@ -11,7 +11,7 @@ making an outbound TCP request using `wasi-sockets`. ## Prerequisites * `Wasmtime` 18.0.0 or later -* `componentize-py` 0.13.5 +* `componentize-py` 0.14.0 Below, we use [Rust](https://rustup.rs/)'s `cargo` to install `Wasmtime`. If you don't have `cargo`, you can download and install from @@ -19,7 +19,7 @@ https://github.com/bytecodealliance/wasmtime/releases/tag/v18.0.0. ``` cargo install --version 18.0.0 wasmtime-cli -pip install componentize-py==0.13.5 +pip install componentize-py==0.14.0 ``` ## Running the demo diff --git a/pyproject.toml b/pyproject.toml index e68e7db..10fa457 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ features = ["pyo3/extension-module"] [project] name = "componentize-py" -version = "0.13.5" +version = "0.14.0" description = "Tool to package Python applications as WebAssembly components" readme = "README.md" license = { file = "LICENSE" } diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index d4f9e98..91edd8f 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -4,12 +4,12 @@ version = "0.1.0" edition = "2021" [lib] -crate-type = [ "staticlib" ] +crate-type = ["staticlib"] [dependencies] -anyhow = "1.0.75" -once_cell = "1.18.0" +anyhow = "1.0.86" +once_cell = "1.19.0" pyo3 = { version = "0.20.0", features = ["abi3-py311", "num-bigint"] } componentize-py-shared = { path = "../shared" } -num-bigint = "0.4.4" +num-bigint = "0.4.6" wit-bindgen = "0.16.0" diff --git a/src/abi.rs b/src/abi.rs index 600c37e..0519f0e 100644 --- a/src/abi.rs +++ b/src/abi.rs @@ -119,8 +119,8 @@ pub fn has_pointer(resolve: &Resolve, ty: Type) -> bool { | Type::Char | Type::U64 | Type::S64 - | Type::Float32 - | Type::Float64 => false, + | Type::F32 + | Type::F64 => false, Type::String => true, Type::Id(id) => match &resolve.types[id].kind { TypeDefKind::Record(record) => record @@ -174,12 +174,12 @@ pub fn abi(resolve: &Resolve, ty: Type) -> Abi { align: 8, flattened: vec![ValType::I64], }, - Type::Float32 => Abi { + Type::F32 => Abi { size: 4, align: 4, flattened: vec![ValType::F32], }, - Type::Float64 => Abi { + Type::F64 => Abi { size: 8, align: 8, flattened: vec![ValType::F64], diff --git a/src/bindgen.rs b/src/bindgen.rs index 248c61a..e7fa834 100644 --- a/src/bindgen.rs +++ b/src/bindgen.rs @@ -606,14 +606,14 @@ impl<'a> FunctionBindgen<'a> { *IMPORTS.get("componentize-py#ToCanonI64").unwrap(), )); } - Type::Float32 => { + Type::F32 => { self.push(Ins::LocalGet(context)); self.push(Ins::LocalGet(value)); self.push(Ins::Call( *IMPORTS.get("componentize-py#ToCanonF32").unwrap(), )); } - Type::Float64 => { + Type::F64 => { self.push(Ins::LocalGet(context)); self.push(Ins::LocalGet(value)); self.push(Ins::Call( @@ -896,12 +896,12 @@ impl<'a> FunctionBindgen<'a> { self.to_canon(ty, context, value); self.push(Ins::I64Store(mem_arg(0, 3))); } - Type::Float32 => { + Type::F32 => { self.push(Ins::LocalGet(destination)); self.to_canon(ty, context, value); self.push(Ins::F32Store(mem_arg(0, 2))); } - Type::Float64 => { + Type::F64 => { self.push(Ins::LocalGet(destination)); self.to_canon(ty, context, value); self.push(Ins::F64Store(mem_arg(0, 3))); @@ -1188,12 +1188,12 @@ impl<'a> FunctionBindgen<'a> { self.push(Ins::LocalGet(source[0])); self.push(Ins::I64Store(mem_arg(0, 3))); } - Type::Float32 => { + Type::F32 => { self.push(Ins::LocalGet(destination)); self.push(Ins::LocalGet(source[0])); self.push(Ins::F32Store(mem_arg(0, 2))); } - Type::Float64 => { + Type::F64 => { self.push(Ins::LocalGet(destination)); self.push(Ins::LocalGet(source[0])); self.push(Ins::F64Store(mem_arg(0, 3))); @@ -1431,14 +1431,14 @@ impl<'a> FunctionBindgen<'a> { *IMPORTS.get("componentize-py#FromCanonI64").unwrap(), )); } - Type::Float32 => { + Type::F32 => { self.push(Ins::LocalGet(context)); self.push(Ins::LocalGet(value[0])); self.push(Ins::Call( *IMPORTS.get("componentize-py#FromCanonF32").unwrap(), )); } - Type::Float64 => { + Type::F64 => { self.push(Ins::LocalGet(context)); self.push(Ins::LocalGet(value[0])); self.push(Ins::Call( @@ -1761,7 +1761,7 @@ impl<'a> FunctionBindgen<'a> { self.from_canon(ty, context, &[value]); self.pop_local(value, ValType::I64); } - Type::Float32 => { + Type::F32 => { let value = self.push_local(ValType::F32); self.push(Ins::LocalGet(source)); self.push(Ins::F32Load(mem_arg(0, 2))); @@ -1769,7 +1769,7 @@ impl<'a> FunctionBindgen<'a> { self.from_canon(ty, context, &[value]); self.pop_local(value, ValType::F32); } - Type::Float64 => { + Type::F64 => { let value = self.push_local(ValType::F64); self.push(Ins::LocalGet(source)); self.push(Ins::F64Load(mem_arg(0, 3))); @@ -2051,11 +2051,11 @@ impl<'a> FunctionBindgen<'a> { self.push(Ins::LocalGet(source)); self.push(Ins::I64Load(mem_arg(0, 3))); } - Type::Float32 => { + Type::F32 => { self.push(Ins::LocalGet(source)); self.push(Ins::F32Load(mem_arg(0, 2))); } - Type::Float64 => { + Type::F64 => { self.push(Ins::LocalGet(source)); self.push(Ins::F64Load(mem_arg(0, 3))); } @@ -2258,8 +2258,8 @@ impl<'a> FunctionBindgen<'a> { | Type::Char | Type::U64 | Type::S64 - | Type::Float32 - | Type::Float64 => {} + | Type::F32 + | Type::F64 => {} Type::String => { self.push(Ins::LocalGet(value[0])); @@ -2417,8 +2417,8 @@ impl<'a> FunctionBindgen<'a> { | Type::Char | Type::U64 | Type::S64 - | Type::Float32 - | Type::Float64 => {} + | Type::F32 + | Type::F64 => {} Type::String => { self.push(Ins::LocalGet(value)); diff --git a/src/bindings.rs b/src/bindings.rs index 8d4b631..185e463 100644 --- a/src/bindings.rs +++ b/src/bindings.rs @@ -11,7 +11,7 @@ use { std::borrow::Cow, wasm_encoder::{ CodeSection, ConstExpr, CustomSection, ElementSection, Elements, Encode, EntityType, - ExportKind, ExportSection, Function, FunctionSection, GlobalType, HeapType, ImportSection, + ExportKind, ExportSection, Function, FunctionSection, GlobalType, ImportSection, Instruction as Ins, MemoryType, Module, RefType, TableType, TypeSection, ValType, }, wit_component::metadata, @@ -112,6 +112,7 @@ pub fn make_bindings( EntityType::Global(GlobalType { val_type: ValType::I32, mutable: false, + shared: false, }), ); global_names.push((table_base, "__table_base".to_owned())); @@ -123,6 +124,7 @@ pub fn make_bindings( EntityType::Global(GlobalType { val_type: ValType::I32, mutable: true, + shared: false, }), ); global_names.push((stack_pointer, "__stack_pointer".to_owned())); @@ -135,6 +137,7 @@ pub fn make_bindings( maximum: None, memory64: false, shared: false, + page_size_log2: None, }), ); @@ -142,10 +145,7 @@ pub fn make_bindings( "env", "__indirect_function_table", EntityType::Table(TableType { - element_type: RefType { - nullable: true, - heap_type: HeapType::Func, - }, + element_type: RefType::FUNCREF, minimum: summary .functions .iter() @@ -154,6 +154,8 @@ pub fn make_bindings( .try_into() .unwrap(), maximum: None, + table64: false, + shared: false, }), ); @@ -271,8 +273,8 @@ pub fn make_bindings( dispatch.instruction(&Ins::GlobalGet(table_base)); dispatch.instruction(&Ins::I32Add); dispatch.instruction(&Ins::CallIndirect { - ty: dispatchable_offset, - table: 0, + type_index: dispatchable_offset, + table_index: 0, }); dispatch.instruction(&Ins::End); diff --git a/src/command.rs b/src/command.rs index 18f93ad..4de7d43 100644 --- a/src/command.rs +++ b/src/command.rs @@ -35,13 +35,6 @@ pub struct Common { /// Disable non-error output #[arg(short = 'q', long)] pub quiet: bool, - - /// Optional `isyswasfa` suffix. - /// - /// If this is specified, the generated component will use [isyswasfa](https://github.com/dicej/isyswasfa) to - /// polyfill composable concurrency. - #[arg(long)] - pub isyswasfa: Option, } #[derive(clap::Subcommand, Debug)] @@ -129,7 +122,6 @@ fn generate_bindings(common: Common, bindings: Bindings) -> Result<()> { common.world.as_deref(), bindings.world_module.as_deref(), &bindings.output_dir, - common.isyswasfa.as_deref(), ) } @@ -157,7 +149,6 @@ fn componentize(common: Common, componentize: Componentize) -> Result<()> { &componentize.app_name, &componentize.output, None, - common.isyswasfa.as_deref(), componentize.stub_wasi, ))?; diff --git a/src/lib.rs b/src/lib.rs index fd519fe..b1eb179 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,14 +31,10 @@ use { Config, Engine, Store, }, wasmtime_wasi::{ - preview2::{ - command as wasi_command, - pipe::{MemoryInputPipe, MemoryOutputPipe}, - DirPerms, FilePerms, WasiCtx, WasiCtxBuilder, WasiView, - }, - Dir, + pipe::{MemoryInputPipe, MemoryOutputPipe}, + DirPerms, FilePerms, WasiCtx, WasiCtxBuilder, WasiView, }, - wit_parser::{Resolve, TypeDefKind, UnresolvedPackage, WorldId, WorldItem, WorldKey}, + wit_parser::{Resolve, TypeDefKind, UnresolvedPackageGroup, WorldId, WorldItem, WorldKey}, zstd::Decoder, }; @@ -125,9 +121,7 @@ impl Invoker for MyInvoker { async fn call_s32(&mut self, function: &str) -> Result { let func = self .instance - .exports(&mut self.store) - .root() - .typed_func::<(), (i32,)>(function)?; + .get_typed_func::<(), (i32,)>(&mut self.store, function)?; let result = func.call_async(&mut self.store, ()).await?.0; func.post_return_async(&mut self.store).await?; Ok(result) @@ -136,9 +130,7 @@ impl Invoker for MyInvoker { async fn call_s64(&mut self, function: &str) -> Result { let func = self .instance - .exports(&mut self.store) - .root() - .typed_func::<(), (i64,)>(function)?; + .get_typed_func::<(), (i64,)>(&mut self.store, function)?; let result = func.call_async(&mut self.store, ()).await?.0; func.post_return_async(&mut self.store).await?; Ok(result) @@ -147,9 +139,7 @@ impl Invoker for MyInvoker { async fn call_float32(&mut self, function: &str) -> Result { let func = self .instance - .exports(&mut self.store) - .root() - .typed_func::<(), (f32,)>(function)?; + .get_typed_func::<(), (f32,)>(&mut self.store, function)?; let result = func.call_async(&mut self.store, ()).await?.0; func.post_return_async(&mut self.store).await?; Ok(result) @@ -158,9 +148,7 @@ impl Invoker for MyInvoker { async fn call_float64(&mut self, function: &str) -> Result { let func = self .instance - .exports(&mut self.store) - .root() - .typed_func::<(), (f64,)>(function)?; + .get_typed_func::<(), (f64,)>(&mut self.store, function)?; let result = func.call_async(&mut self.store, ()).await?.0; func.post_return_async(&mut self.store).await?; Ok(result) @@ -169,9 +157,7 @@ impl Invoker for MyInvoker { async fn call_list_u8(&mut self, function: &str) -> Result> { let func = self .instance - .exports(&mut self.store) - .root() - .typed_func::<(), (Vec,)>(function)?; + .get_typed_func::<(), (Vec,)>(&mut self.store, function)?; let result = func.call_async(&mut self.store, ()).await?.0; func.post_return_async(&mut self.store).await?; Ok(result) @@ -183,15 +169,11 @@ pub fn generate_bindings( world: Option<&str>, world_module: Option<&str>, output_dir: &Path, - isyswasfa: Option<&str>, ) -> Result<()> { // TODO: Split out and reuse the code responsible for finding and using componentize-py.toml files in the // `componentize` function below, since that can affect the bindings we should be generating. - let (mut resolve, world) = parse_wit(wit_path, world)?; - if let Some(suffix) = isyswasfa { - isyswasfa_transform::transform(&mut resolve, world, Some(suffix)); - } + let (resolve, world) = parse_wit(wit_path, world)?; let summary = Summary::try_new(&resolve, &iter::once(world).collect())?; let world_name = resolve.worlds[world].name.to_snake_case().escape(); let world_module = world_module.unwrap_or(&world_name); @@ -203,7 +185,6 @@ pub fn generate_bindings( world_module, &mut Locations::default(), true, - isyswasfa, )?; Ok(()) @@ -218,7 +199,6 @@ pub async fn componentize( app_name: &str, output_path: &Path, add_to_linker: Option<&dyn Fn(&mut Linker) -> Result<()>>, - isyswasfa: Option<&str>, stub_wasi: bool, ) -> Result<()> { // Remove non-existent elements from `python_path` so we don't choke on them later: @@ -322,7 +302,7 @@ pub async fn componentize( if let Some(resolve) = &mut resolve { let remap = resolve.merge(my_resolve)?; - world = remap.worlds[world.index()]; + world = remap.worlds[world.index()].expect("missing world"); } else { resolve = Some(my_resolve); } @@ -337,7 +317,7 @@ pub async fn componentize( }) .collect::>>()?; - let mut resolve = if let Some(resolve) = resolve { + let resolve = if let Some(resolve) = resolve { resolve } else { // If no WIT directory was provided as a parameter and none were referenced by Python packages, use ./wit @@ -359,14 +339,6 @@ pub async fn componentize( .chain(main_world) .collect::>(); - if let Some(suffix) = isyswasfa { - let mut suffix = Some(suffix); - for &world in &worlds { - isyswasfa_transform::transform(&mut resolve, world, suffix); - suffix = None; - } - } - let summary = Summary::try_new(&resolve, &worlds)?; struct Library { @@ -562,30 +534,12 @@ pub async fn componentize( .env("PYTHONUNBUFFERED", "1") .env("COMPONENTIZE_PY_APP_NAME", app_name) .env("PYTHONHOME", "/python") - .preopened_dir( - Dir::open_ambient_dir(stdlib.path(), cap_std::ambient_authority()) - .with_context(|| format!("unable to open {}", stdlib.path().display()))?, - DirPerms::all(), - FilePerms::all(), - "python", - ) - .preopened_dir( - Dir::open_ambient_dir(bundled.path(), cap_std::ambient_authority()) - .with_context(|| format!("unable to open {}", bundled.path().display()))?, - DirPerms::all(), - FilePerms::all(), - "bundled", - ); + .preopened_dir(stdlib.path(), "python", DirPerms::all(), FilePerms::all())? + .preopened_dir(bundled.path(), "bundled", DirPerms::all(), FilePerms::all())?; // Generate guest mounts for each host directory in `python_path`. for (index, path) in python_path.iter().enumerate() { - wasi.preopened_dir( - Dir::open_ambient_dir(path, cap_std::ambient_authority()) - .with_context(|| format!("unable to open {path}"))?, - DirPerms::all(), - FilePerms::all(), - index.to_string(), - ); + wasi.preopened_dir(path, index.to_string(), DirPerms::all(), FilePerms::all())?; } // For each Python package with a `componentize-py.toml` file that specifies where generated bindings for that @@ -636,7 +590,6 @@ pub async fn componentize( &binding_module, &mut locations, false, - isyswasfa, )?; world_dir_mounts.push(( @@ -654,14 +607,7 @@ pub async fn componentize( let world_dir = tempfile::tempdir()?; let module_path = world_dir.path().join(&module); fs::create_dir_all(&module_path)?; - summary.generate_code( - &module_path, - world, - &module, - &mut locations, - false, - isyswasfa, - )?; + summary.generate_code(&module_path, world, &module, &mut locations, false)?; world_dir_mounts.push((vec!["world".to_owned()], world_dir)); // The helper utilities are hard-coded to assume the world module is named `proxy`. Here we replace that @@ -687,19 +633,13 @@ pub async fn componentize( for (mounts, world_dir) in world_dir_mounts.iter() { for mount in mounts { - wasi.preopened_dir( - Dir::open_ambient_dir(world_dir.path(), cap_std::ambient_authority()) - .with_context(|| format!("unable to open {}", world_dir.path().display()))?, - DirPerms::all(), - FilePerms::all(), - mount, - ); + wasi.preopened_dir(world_dir.path(), mount, DirPerms::all(), FilePerms::all())?; } } // Generate a `Symbols` object containing metadata to be passed to the pre-init function. The runtime library // will use this to look up types and functions that will later be referenced by the generated Wasm code. - let symbols = summary.collect_symbols(&locations, isyswasfa); + let symbols = summary.collect_symbols(&locations); // Finally, pre-initialize the component, writing the result to `output_path`. @@ -742,13 +682,14 @@ pub async fn componentize( async move { let component = &Component::new(&engine, instrumented)?; if !added_to_linker { - add_wasi_and_stubs(&resolve, &worlds, component, &mut linker)?; + add_wasi_and_stubs(&resolve, &worlds, &mut linker)?; } - let (init, instance) = - Init::instantiate_async(&mut store, component, &linker).await?; + let pre = InitPre::new(linker.instantiate_pre(component)?)?; + let instance = pre.instance_pre.instantiate_async(&mut store).await?; + let guest = pre.interface0.load(&mut store, &instance)?; - init.exports() + guest .call_init(&mut store, &app_name, &symbols, stub_wasi) .await? .map_err(|e| anyhow!("{e}"))?; @@ -777,8 +718,8 @@ fn parse_wit(path: &Path, world: Option<&str>) -> Result<(Resolve, WorldId)> { let pkg = if path.is_dir() { resolve.push_dir(path)?.0 } else { - let pkg = UnresolvedPackage::parse_file(path)?; - resolve.push(pkg)? + let pkg = UnresolvedPackageGroup::parse_file(path)?; + resolve.push_group(pkg)? }; let world = resolve.select_world(pkg, world)?; Ok((resolve, world)) @@ -787,10 +728,9 @@ fn parse_wit(path: &Path, world: Option<&str>) -> Result<(Resolve, WorldId)> { fn add_wasi_and_stubs( resolve: &Resolve, worlds: &IndexSet, - component: &Component, linker: &mut Linker, ) -> Result<()> { - wasi_command::add_to_linker(linker)?; + wasmtime_wasi::add_to_linker_async(linker)?; enum Stub<'a> { Function(&'a String), @@ -801,13 +741,13 @@ fn add_wasi_and_stubs( for &world in worlds { for (key, item) in &resolve.worlds[world].imports { match item { - WorldItem::Interface(interface) => { + WorldItem::Interface { id, .. } => { let interface_name = match key { WorldKey::Name(name) => name.clone(), WorldKey::Interface(interface) => resolve.id_of(*interface).unwrap(), }; - let interface = &resolve.interfaces[*interface]; + let interface = &resolve.interfaces[*id]; for function_name in interface.functions.keys() { stubs .entry(Some(interface_name.clone())) @@ -849,7 +789,7 @@ fn add_wasi_and_stubs( for stub in stubs { let interface_name = interface_name.clone(); match stub { - Stub::Function(name) => instance.func_new(component, name, { + Stub::Function(name) => instance.func_new(name, { let name = name.clone(); move |_, _, _| { Err(anyhow!("called trapping stub: {interface_name}#{name}")) @@ -870,7 +810,7 @@ fn add_wasi_and_stubs( let mut instance = linker.root(); for stub in stubs { match stub { - Stub::Function(name) => instance.func_new(component, name, { + Stub::Function(name) => instance.func_new(name, { let name = name.clone(); move |_, _, _| Err(anyhow!("called trapping stub: {name}")) }), diff --git a/src/python.rs b/src/python.rs index e870845..00d24c6 100644 --- a/src/python.rs +++ b/src/python.rs @@ -7,7 +7,7 @@ use { #[allow(clippy::too_many_arguments)] #[pyo3::pyfunction] #[pyo3(name = "componentize")] -#[pyo3(signature = (wit_path, world, python_path, module_worlds, app_name, output_path, isyswasfa, stub_wasi))] +#[pyo3(signature = (wit_path, world, python_path, module_worlds, app_name, output_path, stub_wasi))] fn python_componentize( wit_path: Option, world: Option<&str>, @@ -15,7 +15,6 @@ fn python_componentize( module_worlds: Vec<(&str, &str)>, app_name: &str, output_path: PathBuf, - isyswasfa: Option<&str>, stub_wasi: bool, ) -> PyResult<()> { (|| { @@ -27,7 +26,6 @@ fn python_componentize( app_name, &output_path, None, - isyswasfa, stub_wasi, )) })() @@ -36,15 +34,14 @@ fn python_componentize( #[pyo3::pyfunction] #[pyo3(name = "generate_bindings")] -#[pyo3(signature = (wit_path, world, world_module, output_dir, isyswasfa))] +#[pyo3(signature = (wit_path, world, world_module, output_dir))] fn python_generate_bindings( wit_path: PathBuf, world: Option<&str>, world_module: Option<&str>, output_dir: PathBuf, - isyswasfa: Option<&str>, ) -> PyResult<()> { - crate::generate_bindings(&wit_path, world, world_module, &output_dir, isyswasfa) + crate::generate_bindings(&wit_path, world, world_module, &output_dir) .map_err(|e| PyAssertionError::new_err(format!("{e:?}"))) } diff --git a/src/summary.rs b/src/summary.rs index f01accd..e9c76e8 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -3,15 +3,15 @@ use { abi::{self, MAX_FLAT_PARAMS, MAX_FLAT_RESULTS}, bindgen::{self, DISPATCHABLE_CORE_PARAM_COUNT}, exports::exports::{ - self, Bundled, Case, Constructor, Function, FunctionExport, LocalResource, OwnedKind, - OwnedType, RemoteResource, Resource, Static, Symbols, + self, Case, Constructor, Function, FunctionExport, LocalResource, OwnedKind, OwnedType, + RemoteResource, Resource, Static, Symbols, }, util::Types as _, }, anyhow::{bail, Result}, heck::{ToShoutySnakeCase, ToSnakeCase, ToUpperCamelCase}, indexmap::{IndexMap, IndexSet}, - once_cell::{sync, unsync}, + once_cell::sync, semver::Version, std::{ collections::{hash_map::Entry, HashMap, HashSet}, @@ -297,8 +297,8 @@ impl<'a> Summary<'a> { | Type::Char | Type::U64 | Type::S64 - | Type::Float32 - | Type::Float64 + | Type::F32 + | Type::F64 | Type::String => (), Type::Id(id) => { self.world_types.entry(world).or_default().insert(id); @@ -522,7 +522,7 @@ impl<'a> Summary<'a> { } match item { - WorldItem::Interface(id) => { + WorldItem::Interface { id, .. } => { let (package, item_name) = match key { wit_parser::WorldKey::Name(name) => (None, name), wit_parser::WorldKey::Interface(id) => { @@ -694,41 +694,14 @@ impl<'a> Summary<'a> { } } - pub fn collect_symbols(&self, locations: &Locations, isyswasfa: Option<&str>) -> Symbols { - let only_one_world_export = unsync::Lazy::new(|| { - self.functions - .iter() - .filter(|function| { - matches!( - (&function.kind, &function.interface), - (FunctionKind::Export, None) - ) - }) - .count() - == 1 - }); + pub fn collect_symbols(&self, locations: &Locations) -> Symbols { let mut exports = Vec::new(); for function in &self.functions { if let FunctionKind::Export = function.kind { let scope = if let Some(interface) = &function.interface { &self.exported_interface_names[&interface.id] } else { - let scope = locations.keys.get(&function.key()).unwrap(); - - if let Some(suffix) = isyswasfa { - if *only_one_world_export - && function.name == format!("isyswasfa-poll{suffix}") - { - exports.push(FunctionExport::Bundled(Bundled { - module: scope.to_snake_case().escape(), - protocol: scope.to_upper_camel_case().escape(), - name: self.function_name(function), - })); - continue; - } - } - - scope + locations.keys.get(&function.key()).unwrap() }; exports.push(match function.wit_kind { @@ -964,8 +937,8 @@ impl<'a> Summary<'a> { | Type::Char | Type::U64 | Type::S64 - | Type::Float32 - | Type::Float64 + | Type::F32 + | Type::F64 | Type::String => (), Type::Id(id) => { let ty = &self.resolve.types[id]; @@ -1078,202 +1051,6 @@ impl<'a> Summary<'a> { sorted } - #[allow(clippy::too_many_arguments)] - fn async_export_code( - &self, - world_module: &str, - function: &MyFunction, - names: &mut TypeNames, - seen: &HashSet, - class_method: &str, - params: &str, - need_isyswasfa_guest: &mut bool, - ) -> (&'static str, String) { - if let Some(prefix) = function.name.strip_suffix("-isyswasfa-start") { - *need_isyswasfa_guest = true; - - let name = self.function_name_with(&function.wit_kind, prefix); - - let args = function - .params - .iter() - .map(|(name, _)| name.to_snake_case().escape()) - .collect::>() - .join(", "); - - let prefix = match function.wit_kind { - wit_parser::FunctionKind::Freestanding | wit_parser::FunctionKind::Method(_) => { - "self." - } - wit_parser::FunctionKind::Static(_) => "cls.", - wit_parser::FunctionKind::Constructor(_) => unreachable!(), - }; - - let FunctionCode { - return_type, error, .. - } = self.function_code( - Direction::Export, - world_module, - &MyFunction { - results: &if let Results::Anon(Type::Id(id)) = &function.results { - if let TypeDefKind::Result(Result_ { ok, .. }) = - &self.resolve.types[*id].kind - { - ok.map(Results::Anon) - .unwrap_or_else(|| Results::Named(Vec::new())) - } else { - unreachable!() - } - } else { - unreachable!() - }, - interface: function.interface.clone(), - wit_kind: function.wit_kind.clone(), - ..*function - }, - names, - seen, - None, - ); - - let docs = docstring(world_module, function.docs, 2, error.as_deref()); - - let code = if error.is_some() { - format!("return isyswasfa_guest.first_poll({prefix}{name}({args}))") - } else { - format!( - "result = isyswasfa_guest.first_poll({prefix}{name}({args})) - if isinstance(result, Ok): - return result.value - else: - raise result" - ) - }; - - ( - "", - format!( - "{code} -{class_method} - @abstractmethod - async def {name}({params}){return_type}: - {docs}{NOT_IMPLEMENTED} -" - ), - ) - } else if function.name.ends_with("-isyswasfa-result") { - *need_isyswasfa_guest = true; - - ("", "return isyswasfa_guest.get_ready(ready)".into()) - } else { - ( - "@abstractmethod - ", - NOT_IMPLEMENTED.into(), - ) - } - } - - #[allow(clippy::too_many_arguments)] - fn async_import_code( - &self, - indent_level: usize, - world_module: &str, - function: &MyFunction, - names: &mut TypeNames, - seen: &HashSet, - class_method: &str, - snake: &str, - params: &str, - need_isyswasfa_guest: &mut bool, - ) -> String { - // TODO: deduplicate code with respect to `async_export_code` - - if let Some(prefix) = function.name.strip_suffix("-isyswasfa-start") { - *need_isyswasfa_guest = true; - - let name = self.function_name_with(&function.wit_kind, prefix); - let args = function - .params - .iter() - .map(|(name, _)| name.to_snake_case().escape()) - .collect::>() - .join(", "); - - let result = format!("{name}_isyswasfa_result"); - - let prefix = match function.wit_kind { - wit_parser::FunctionKind::Freestanding => "", - wit_parser::FunctionKind::Method(_) => "self.", - wit_parser::FunctionKind::Static(_) => "cls.", - wit_parser::FunctionKind::Constructor(_) => unreachable!(), - }; - - let FunctionCode { - return_type, error, .. - } = self.function_code( - Direction::Export, - world_module, - &MyFunction { - results: &if let Results::Anon(Type::Id(id)) = &function.results { - if let TypeDefKind::Result(Result_ { ok, .. }) = - &self.resolve.types[*id].kind - { - ok.map(Results::Anon) - .unwrap_or_else(|| Results::Named(Vec::new())) - } else { - unreachable!() - } - } else { - unreachable!() - }, - interface: function.interface.clone(), - wit_kind: function.wit_kind.clone(), - ..*function - }, - names, - seen, - None, - ); - - let docs = docstring( - world_module, - function.docs, - indent_level + 1, - error.as_deref(), - ); - - let indent = (0..indent_level) - .map(|_| " ") - .collect::>() - .concat(); - - let code = if error.is_some() { - format!( - "result = {prefix}{snake}({args}) -{indent} if isinstance(result, Ok): -{indent} return result.value -{indent} else: -{indent} raise result" - ) - } else { - format!("return {prefix}{snake}({args})") - }; - - format!( - "{class_method} -{indent}async def {name}({params}){return_type}: -{indent} {docs}try: -{indent} {code} -{indent} except Err as e: -{indent} return {prefix}{result}(await isyswasfa_guest.await_ready(e.value)) -" - ) - } else { - String::new() - } - } - fn interface_names( &self, ids: impl Iterator, @@ -1346,7 +1123,6 @@ impl<'a> Summary<'a> { world_module: &str, locations: &mut Locations, stub_runtime_calls: bool, - isyswasfa: Option<&str>, ) -> Result<()> { #[derive(Default)] struct Definitions<'a> { @@ -1355,7 +1131,6 @@ impl<'a> Summary<'a> { type_imports: HashSet, function_imports: HashSet, docs: Option<&'a str>, - need_isyswasfa_guest: bool, alias_module: Option, } @@ -1412,8 +1187,6 @@ class {name}: ) }; - let mut need_isyswasfa_guest = false; - let code = if let Some(location) = locations.types.get(&id) { location.aliases.clone() } else { @@ -1590,39 +1363,19 @@ class {camel}(Flag): " ) } - } else { - let async_code = if isyswasfa.is_some() { - self.async_import_code( - 1, - world_module, - function, - &mut names, - &seen, - class_method, - &snake, - ¶ms, - &mut need_isyswasfa_guest, - ) - } else { - String::new() - }; - - if stub_runtime_calls { - format!( - "{class_method} + } else if stub_runtime_calls { + format!( + "{class_method} def {snake}({params}){return_type}: - {docs}{NOT_IMPLEMENTED} -{async_code}" - ) - } else { - format!( - "{class_method} + {docs}{NOT_IMPLEMENTED}" + ) + } else { + format!( + "{class_method} def {snake}({params}){return_type}: {docs}result = componentize_py_runtime.call_import({index}, [{args}], {result_count}) - {return_statement} -{async_code}" - ) - } + {return_statement}" + ) } }; @@ -1656,7 +1409,7 @@ class {camel}(Flag): "#; if stub_runtime_calls { format!( - "{enter} + "{enter} def __exit__(self, *args): {docs}{NOT_IMPLEMENTED} " @@ -1712,28 +1465,11 @@ class {camel}: let docs = docstring(world_module, function.docs, 2, error.as_deref()); - let (abstract_method, body) = if isyswasfa.is_some() { - self.async_export_code( - world_module, - function, - &mut names, - &seen, - class_method, - ¶ms, - &mut need_isyswasfa_guest, - ) - } else { - ( - "@abstractmethod - ", - NOT_IMPLEMENTED.into(), - ) - }; - format!( "{class_method} - {abstract_method}def {snake}({params}){return_type}: - {docs}{body} + @abstractmethod + def {snake}({params}){return_type}: + {docs}{NOT_IMPLEMENTED} " ) }; @@ -1859,7 +1595,6 @@ class {camel}(Protocol): definitions.types.push(code); definitions.type_imports.extend(names.imports.clone()); definitions.docs = docs; - definitions.need_isyswasfa_guest |= need_isyswasfa_guest; } } @@ -1918,34 +1653,16 @@ class {camel}(Protocol): None, ); - let mut need_isyswasfa_guest = false; - match function.kind { FunctionKind::Import => { let docs = docstring(world_module, function.docs, 1, error.as_deref()); - let async_code = if isyswasfa.is_some() { - self.async_import_code( - 0, - world_module, - function, - &mut names, - &seen, - "", - &snake, - ¶ms, - &mut need_isyswasfa_guest, - ) - } else { - String::new() - }; - let code = if stub_runtime_calls { format!( " def {snake}({params}){return_type}: {docs}{NOT_IMPLEMENTED} -{async_code}" +" ) } else { format!( @@ -1953,7 +1670,7 @@ def {snake}({params}){return_type}: def {snake}({params}){return_type}: {docs}result = componentize_py_runtime.call_import({index}, [{args}], {result_count}) {return_statement} -{async_code}" +" ) }; @@ -1972,7 +1689,6 @@ def {snake}({params}){return_type}: definitions.functions.push(code); definitions.function_imports.extend(names.imports); definitions.docs = docs; - definitions.need_isyswasfa_guest |= need_isyswasfa_guest; } FunctionKind::Export => { let (definitions, docs) = if let Some(interface) = &function.interface { @@ -2002,41 +1718,17 @@ def {snake}({params}){return_type}: let function_docs = docstring(world_module, function.docs, 2, error.as_deref()); - let (abstract_method, body) = if let Some(suffix) = isyswasfa { - if function.name == format!("isyswasfa-poll{suffix}") { - need_isyswasfa_guest = true; - - ("", "return isyswasfa_guest.poll(input)".to_owned()) - } else { - self.async_export_code( - world_module, - function, - &mut names, - &seen, - "", - ¶ms, - &mut need_isyswasfa_guest, - ) - } - } else { - ( - "@abstractmethod - ", - NOT_IMPLEMENTED.into(), - ) - }; - let code = format!( " - {abstract_method}def {snake}({params}){return_type}: - {function_docs}{body} + @abstractmethod + def {snake}({params}){return_type}: + {function_docs}{NOT_IMPLEMENTED} " ); definitions.functions.push(code); definitions.function_imports.extend(names.imports); definitions.docs = docs; - definitions.need_isyswasfa_guest |= need_isyswasfa_guest; } else { definitions.alias_module = Some(module.clone()); } @@ -2112,17 +1804,13 @@ Result = Union[Ok[T], Err[E]] for (id, code) in interface_imports { let name = self.imported_interface_names.get(&id).unwrap(); let mut file = - File::create(dir.join(&format!("{}.py", name.to_snake_case().escape())))?; + File::create(dir.join(format!("{}.py", name.to_snake_case().escape())))?; let types = code.types.concat(); let functions = code.functions.concat(); let imports = code .type_imports .union(&code.function_imports) .map(|&interface| import("..", interface)) - .chain( - code.need_isyswasfa_guest - .then(|| "import isyswasfa_guest".into()), - ) .collect::>() .join("\n"); let docs = docstring(world_module, code.docs, 0, None); @@ -2151,22 +1839,15 @@ from ..types import Result, Ok, Err, Some let mut protocol_imports = HashSet::new(); let mut protocols = String::new(); - let mut need_isyswasfa_guest = false; for (id, code) in interface_exports { - need_isyswasfa_guest |= code.need_isyswasfa_guest; - let name = self.exported_interface_names.get(&id).unwrap(); let mut file = - File::create(dir.join(&format!("{}.py", name.to_snake_case().escape())))?; + File::create(dir.join(format!("{}.py", name.to_snake_case().escape())))?; let types = code.types.concat(); let imports = code .type_imports .into_iter() .map(|interface| import("..", interface)) - .chain( - code.need_isyswasfa_guest - .then(|| "import isyswasfa_guest".into()), - ) .collect::>() .join("\n"); let docs = docstring(world_module, code.docs, 0, None); @@ -2215,7 +1896,6 @@ class {camel}(Protocol): let imports = protocol_imports .into_iter() .map(|interface| import("..", interface)) - .chain(need_isyswasfa_guest.then(|| "import isyswasfa_guest".into())) .collect::>() .join("\n"); @@ -2247,14 +1927,8 @@ from ..types import Result, Ok, Err, Some world_exports.functions.concat() }; - let protocol = if isyswasfa.is_some() && world_exports.functions.len() == 1 { - "" - } else { - "(Protocol)" - }; - format!( - "class {camel}{protocol}: + "class {camel}(Protocol): {methods}" ) }; @@ -2269,10 +1943,6 @@ from ..types import Result, Ok, Err, Some .collect(), ) .map(|&interface| import(".", interface)) - .chain( - (world_imports.need_isyswasfa_guest || world_exports.need_isyswasfa_guest) - .then(|| "import isyswasfa_guest".into()), - ) .collect::>() .join("\n"); @@ -2335,8 +2005,8 @@ from .types import Result, Ok, Err, Some | Type::Char | Type::U64 | Type::S64 - | Type::Float32 - | Type::Float64 + | Type::F32 + | Type::F64 | Type::String => false, Type::Id(id) => match &self.resolve.types[id].kind { TypeDefKind::Record(record) => record @@ -2406,7 +2076,7 @@ impl<'a> TypeNames<'a> { | Type::S16 | Type::S32 | Type::S64 => "int".into(), - Type::Float32 | Type::Float64 => "float".into(), + Type::F32 | Type::F64 => "float".into(), Type::Char | Type::String => "str".into(), Type::Id(id) => { let ty = &self.summary.resolve.types[id]; diff --git a/src/test.rs b/src/test.rs index 9c9d5c7..8d1c34e 100644 --- a/src/test.rs +++ b/src/test.rs @@ -12,10 +12,10 @@ use { std::{env, fs, iter, marker::PhantomData}, tokio::runtime::Runtime, wasmtime::{ - component::{Component, Instance, InstancePre, Linker, ResourceTable}, + component::{Component, InstancePre, Linker, ResourceTable}, Config, Engine, Store, }, - wasmtime_wasi::preview2::{WasiCtx, WasiCtxBuilder}, + wasmtime_wasi::{WasiCtx, WasiCtxBuilder}, }; mod echoes; @@ -74,7 +74,6 @@ async fn make_component( "app", &tempdir.path().join("app.wasm"), add_to_linker, - None, false, ) .await?; @@ -106,10 +105,7 @@ trait Host { fn add_to_linker(linker: &mut Linker) -> Result<()>; - async fn instantiate_pre( - store: &mut Store, - pre: &InstancePre, - ) -> Result<(Self::World, Instance)>; + async fn instantiate_pre(store: &mut Store, pre: InstancePre) -> Result; } struct Tester { @@ -182,8 +178,8 @@ impl Tester { ) }); - let (world, _) = runtime - .block_on(H1::instantiate_pre(&mut store, &self.pre)) + let world = runtime + .block_on(H1::instantiate_pre(&mut store, self.pre.clone())) .unwrap(); test(&world, &mut store, &runtime) @@ -214,8 +210,8 @@ impl Tester { Store::new(&ENGINE, Ctx { wasi, table }) }); - let (world, _) = runtime - .block_on(H::instantiate_pre(&mut store, &self.pre)) + let world = runtime + .block_on(H::instantiate_pre(&mut store, self.pre.clone())) .unwrap(); test(v, &world, &mut store, &runtime).unwrap(); diff --git a/src/test/echoes.rs b/src/test/echoes.rs index e5da6d7..0d5b915 100644 --- a/src/test/echoes.rs +++ b/src/test/echoes.rs @@ -5,16 +5,16 @@ use { once_cell::sync::Lazy, proptest::strategy::{Just, Strategy}, wasmtime::{ - component::{Instance, InstancePre, Linker}, + component::{InstancePre, Linker}, Store, }, - wasmtime_wasi::preview2::command, }; wasmtime::component::bindgen!({ path: "src/test/wit", world: "echoes-test", - async: true + async: true, + trappable_imports: true, }); #[async_trait] @@ -192,16 +192,13 @@ impl super::Host for Host { type World = EchoesTest; fn add_to_linker(linker: &mut Linker) -> Result<()> { - command::add_to_linker(&mut *linker)?; + wasmtime_wasi::add_to_linker_async(&mut *linker)?; componentize_py::test::echoes::add_to_linker(linker, |ctx| ctx)?; Ok(()) } - async fn instantiate_pre( - store: &mut Store, - pre: &InstancePre, - ) -> Result<(Self::World, Instance)> { - Ok(EchoesTest::instantiate_pre(store, pre).await?) + async fn instantiate_pre(store: &mut Store, pre: InstancePre) -> Result { + Ok(EchoesTestPre::new(pre)?.instantiate_async(store).await?) } } diff --git a/src/test/tests.rs b/src/test/tests.rs index 53a3377..aa47590 100644 --- a/src/test/tests.rs +++ b/src/test/tests.rs @@ -5,29 +5,25 @@ use { once_cell::sync::Lazy, std::str, wasmtime::{ - component::{Instance, InstancePre, Linker, Resource, ResourceAny}, + component::{InstancePre, Linker, Resource, ResourceAny}, Store, }, - wasmtime_wasi::{ - preview2::{command, DirPerms, FilePerms, WasiCtxBuilder, WasiView}, - Dir, - }, + wasmtime_wasi::{DirPerms, FilePerms, WasiCtxBuilder, WasiView}, }; wasmtime::component::bindgen!({ path: "src/test/wit", world: "tests", async: true, + trappable_imports: true, with: { "componentize-py:test/resource-import-and-export/thing": ThingU32, "componentize-py:test/resource-borrow-import/thing": ThingU32, - "componentize-py:test/resource-borrow-export/thing": ThingU32, "componentize-py:test/resource-with-lists/thing": ThingList, "componentize-py:test/resource-aggregates/thing": ThingU32, "componentize-py:test/resource-alias1/thing": ThingString, "componentize-py:test/resource-floats/float": MyFloat, "resource-floats-imports/float": MyFloat, - "resource-floats-exports/float": MyFloat, "componentize-py:test/resource-borrow-in-record/thing": ThingString, }, }); @@ -39,6 +35,7 @@ mod foo_sdk { async: { only_imports: [], }, + trappable_imports: true, }); } @@ -86,17 +83,14 @@ impl super::Host for Host { type World = Tests; fn add_to_linker(linker: &mut Linker) -> Result<()> { - command::add_to_linker(linker)?; + wasmtime_wasi::add_to_linker_async(linker)?; Tests::add_to_linker(linker, |ctx| ctx)?; foo_sdk::FooWorld::add_to_linker(linker, |ctx| ctx)?; Ok(()) } - async fn instantiate_pre( - store: &mut Store, - pre: &InstancePre, - ) -> Result<(Self::World, Instance)> { - Ok(Tests::instantiate_pre(store, pre).await?) + async fn instantiate_pre(store: &mut Store, pre: InstancePre) -> Result { + Ok(TestsPre::new(pre)?.instantiate_async(store).await?) } } @@ -110,11 +104,10 @@ impl super::Host for FooHost { unreachable!() } - async fn instantiate_pre( - store: &mut Store, - pre: &InstancePre, - ) -> Result<(Self::World, Instance)> { - Ok(foo_sdk::FooWorld::instantiate_pre(store, pre).await?) + async fn instantiate_pre(store: &mut Store, pre: InstancePre) -> Result { + Ok(foo_sdk::FooWorldPre::new(pre)? + .instantiate_async(store) + .await?) } } @@ -128,11 +121,10 @@ impl super::Host for BarHost { unreachable!() } - async fn instantiate_pre( - store: &mut Store, - pre: &InstancePre, - ) -> Result<(Self::World, Instance)> { - Ok(bar_sdk::BarWorld::instantiate_pre(store, pre).await?) + async fn instantiate_pre(store: &mut Store, pre: InstancePre) -> Result { + Ok(bar_sdk::BarWorldPre::new(pre)? + .instantiate_async(store) + .await?) } } @@ -569,6 +561,7 @@ fn resource_alias() -> Result<()> { ); let instance = world.componentize_py_test_resource_alias2(); + let thing1 = thing.call_constructor(&mut *store, "Ciao").await?; let thing2 = thing.call_constructor(&mut *store, "Aloha").await?; let things = instance @@ -804,12 +797,7 @@ fn filesystem() -> Result<()> { let wasi = WasiCtxBuilder::new() .inherit_stdout() .inherit_stderr() - .preopened_dir( - Dir::open_ambient_dir(dir.path(), cap_std::ambient_authority())?, - DirPerms::all(), - FilePerms::all(), - "/", - ) + .preopened_dir(dir.path(), "/", DirPerms::all(), FilePerms::all())? .build(); TESTER.test_with_wasi::(wasi, |world, store, runtime| { diff --git a/test-generator/Cargo.toml b/test-generator/Cargo.toml index f008121..391351b 100644 --- a/test-generator/Cargo.toml +++ b/test-generator/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -anyhow = "1.0.75" -getrandom = "0.2.11" +anyhow = "1.0.86" +getrandom = "0.2.15" hex = "0.4.3" -proptest = "1.4.0" +proptest = "1.5.0" diff --git a/test-generator/src/lib.rs b/test-generator/src/lib.rs index d79c6fb..8888683 100644 --- a/test-generator/src/lib.rs +++ b/test-generator/src/lib.rs @@ -16,7 +16,7 @@ const MAX_LIST_SIZE: usize = 100; const MAX_TUPLE_SIZE: usize = 12; // See note above about `MAX_TUPLE_SIZE` const MAX_PARAM_COUNT: usize = 12; -const MAX_FLAG_COUNT: u32 = 100; +const MAX_FLAG_COUNT: u32 = 32; const MAX_ENUM_COUNT: u32 = 100; static PREFIX: &str = "componentize_py::test::echoes_generated"; @@ -699,7 +699,7 @@ pub fn generate() -> Result<()> { writeln!( &mut typed_function_inits, - r#"echo{test_index}: instance.typed_func::<({params}), ({result_type},)>("echo{test_index}")?,"# + r#"echo{test_index}: instance.get_typed_func::<({params}), ({result_type},)>(&mut *store, component.export_index(Some(&index), "echo{test_index}").unwrap().1)?,"# ) .unwrap(); } @@ -802,7 +802,6 @@ use {{ async_trait::async_trait, once_cell::sync::Lazy, proptest::strategy::{{Just, Strategy}}, - wasmtime_wasi::preview2::command, wasmtime::{{ component::{{Instance, InstancePre, Linker, TypedFunc}}, Store, @@ -812,7 +811,8 @@ use {{ wasmtime::component::bindgen!({{ path: {wit_path:?}, world: "echoes-generated-test", - async: true + async: true, + trappable_imports: true, }}); pub struct Exports {{ @@ -831,21 +831,21 @@ impl super::Host for Host {{ type World = Exports; fn add_to_linker(linker: &mut Linker) -> Result<()> {{ - command::add_to_linker(&mut *linker)?; + wasmtime_wasi::add_to_linker_async(&mut *linker)?; {PREFIX}::add_to_linker(linker, |ctx| ctx)?; Ok(()) }} async fn instantiate_pre( store: &mut Store, - pre: &InstancePre, - ) -> Result<(Self::World, Instance)> {{ - let guest_instance = pre.instantiate_async(&mut *store).await?; - let mut exports = guest_instance.exports(&mut *store); - let mut instance = exports.instance("componentize-py:test/echoes-generated").unwrap(); + pre: InstancePre, + ) -> Result {{ + let component = pre.component(); + let (_, index) = component.export_index(None, "componentize-py:test/echoes-generated").unwrap(); + let instance = pre.instantiate_async(&mut *store).await?; Ok((Self::World {{ {typed_function_inits} - }}, guest_instance)) + }})) }} }}