From 6bf9b5761655ec2e5b9a6b7e0d53ceb9abf52856 Mon Sep 17 00:00:00 2001 From: Aster Date: Wed, 21 Feb 2024 23:15:01 +0800 Subject: [PATCH] Upgrade to wasmtime 18 --- .gitignore | 4 + Cargo.lock | 360 ++++++++++++++++++++++++++----------------------- Cargo.toml | 10 +- src/runtime.rs | 26 +--- 4 files changed, 204 insertions(+), 196 deletions(-) diff --git a/.gitignore b/.gitignore index ea8c4bf..efc2e8d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ +# IDEs +.idea/ + +# Rust /target diff --git a/Cargo.lock b/Cargo.lock index 5f989ae..270b244 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -408,18 +408,18 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.104.1" +version = "0.105.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7c0d51205b863591dd1e7aaa0fb69c2ea7bed48ffa63d6c4a848b07a35a732" +checksum = "29a6391a9172a93f413370fa561c6bca786e06c89cf85f23f02f6345b1c8ee34" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.104.1" +version = "0.105.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ffb467cbc25543e4c20d2ad669bf8275598047b03c89652ad5fe2a0f47fc0e1" +checksum = "409c6cbb326604a53ec47eb6341fc85128f24c81012a014b4c728ed24f6e9350" dependencies = [ "bumpalo", "cranelift-bforest", @@ -438,33 +438,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.104.1" +version = "0.105.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc7e74aed5c2b91e38d090653506afbd2cd3be1ff70593e2aa6bb82b3c6b77ff" +checksum = "fff55e100130995b9ad9ac6b03a24ed5da3c1a1261dcdeb8a7a0292656994fb3" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.104.1" +version = "0.105.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff2dd24cce0775566da85770cb48aa58fef901cf2bff30275b42e7dbe62cbd5" +checksum = "f1446e2eb395fc7b3019a36dccb7eccea923f6caf581b903c8e7e751b6d214a7" [[package]] name = "cranelift-control" -version = "0.104.1" +version = "0.105.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8bcf4d5c73bbca309edf3af2839b5218e5c74cfbf22b0ac492af8a1d11120d9" +checksum = "24076ecf69cbf8b9e1e532ae8e7ac01d850a1c2e127058a26eb3245f9d5b89d1" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.104.1" +version = "0.105.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "286754159b1a685475d6a0b4710832f950d6f4846a817002e2c23ff001321a65" +checksum = "7f40df95180ad317c60459bb90dd87803d35e538f4c54376d8b26c851f6f0a1b" dependencies = [ "serde", "serde_derive", @@ -472,9 +472,9 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.104.1" +version = "0.105.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67150a1fef9857caba710f8c0c8223d640f02c0e5d1ebbfc75ed62912599cb6b" +checksum = "1c3974cc665b699b626742775dae1c1cdea5170f5028ab1f3eb61a7a9a6e2979" dependencies = [ "cranelift-codegen", "log", @@ -484,15 +484,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.104.1" +version = "0.105.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb7ceea70d3e0d7f69df7657f99de902e32016731c5a8d2788c1df0215f00952" +checksum = "99543f92b9c361f3c54a29e945adb5b9ef1318feaa5944453cabbfcb3c495919" [[package]] name = "cranelift-native" -version = "0.104.1" +version = "0.105.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707e5d9384ce4fa3c40af1abf4c3ec49857745cced5187593385f4a2c0b95445" +checksum = "1c0d84dc7d9b3f73ad565eacc4ab36525c407ef5150893b4b94d5f5f904eb48a" dependencies = [ "cranelift-codegen", "libc", @@ -501,9 +501,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.104.1" +version = "0.105.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d957e3ff2a14c2f974a66c22bfcedcd2bd0272af8dce4236869c3942f5a471" +checksum = "53781039219944d59c6d3ec57e6cae31a1a33db71573a945d84ba6d875d0a743" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -511,7 +511,7 @@ dependencies = [ "itertools", "log", "smallvec", - "wasmparser 0.118.1", + "wasmparser 0.121.2", "wasmtime-types", ] @@ -1915,7 +1915,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -2056,13 +2055,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wasi-cap-std-sync" -version = "17.0.1" +name = "wasi-common" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "025e842ba390587e523785ff58bd54fbbf1781b8d3072bc9aba4dc0b809f69da" +checksum = "082a661fe31df4dbb34409f4835ad3d8ba65036bf74aaec9b21fde779978aba7" dependencies = [ "anyhow", - "async-trait", + "bitflags 2.4.1", "cap-fs-ext", "cap-rand", "cap-std", @@ -2070,51 +2069,18 @@ 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 = "17.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4d4023cc65b3615590d38db0afb79234de09b3bb89cb0d8f83bdee9f5c28a8" -dependencies = [ - "anyhow", - "bitflags 2.4.1", - "cap-rand", - "cap-std", - "io-extras", - "log", - "rustix", "thiserror", + "tokio", "tracing", "wasmtime", "wiggle", "windows-sys 0.52.0", ] -[[package]] -name = "wasi-tokio" -version = "17.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c97de58a5b89e9ab479a2f9e17e9eb41d0e0156e3c979b2e7f00e9499d2e97b7" -dependencies = [ - "anyhow", - "cap-std", - "io-extras", - "io-lifetimes", - "rustix", - "tokio", - "wasi-cap-std-sync", - "wasi-common", - "wiggle", -] - [[package]] name = "wasi-virt" version = "0.1.0" @@ -2125,10 +2091,10 @@ dependencies = [ "serde", "toml 0.8.10", "walrus", - "wasm-compose", - "wasm-metadata", + "wasm-compose 0.5.5", + "wasm-metadata 0.10.20", "wasm-opt", - "wit-component", + "wit-component 0.21.0", ] [[package]] @@ -2206,6 +2172,27 @@ dependencies = [ "wat", ] +[[package]] +name = "wasm-compose" +version = "0.200.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b81858e6426b8c4f5f65a5dff0e55b7715c903ba5fe6e402805496e1798f57ef" +dependencies = [ + "anyhow", + "heck 0.4.1", + "im-rc", + "indexmap 2.1.0", + "log", + "petgraph", + "serde", + "serde_derive", + "serde_yaml", + "smallvec", + "wasm-encoder 0.200.0", + "wasmparser 0.200.0", + "wat", +] + [[package]] name = "wasm-encoder" version = "0.29.0" @@ -2217,21 +2204,22 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.38.1" +version = "0.41.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad2b51884de9c7f4fe2fd1043fccb8dcad4b1e29558146ee57a144d15779f3f" +checksum = "972f97a5d8318f908dded23594188a90bcd09365986b1163e66d70170e5287ae" dependencies = [ "leb128", + "wasmparser 0.121.2", ] [[package]] name = "wasm-encoder" -version = "0.41.2" +version = "0.200.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972f97a5d8318f908dded23594188a90bcd09365986b1163e66d70170e5287ae" +checksum = "b9e3fb0c8fbddd78aa6095b850dfeedbc7506cf5f81e633f69cf8f2333ab84b9" dependencies = [ "leb128", - "wasmparser 0.121.2", + "wasmparser 0.200.0", ] [[package]] @@ -2250,6 +2238,22 @@ dependencies = [ "wasmparser 0.121.2", ] +[[package]] +name = "wasm-metadata" +version = "0.200.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b8cc0c21f46d55b0aaa419cacce1eadcf28eaebd0e1488d6a6313ee71a586" +dependencies = [ + "anyhow", + "indexmap 2.1.0", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.200.0", + "wasmparser 0.200.0", +] + [[package]] name = "wasm-opt" version = "0.116.0" @@ -2298,19 +2302,20 @@ checksum = "449167e2832691a1bff24cde28d2804e90e09586a448c8e76984792c44334a6b" [[package]] name = "wasmparser" -version = "0.118.1" +version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ee9723b928e735d53000dec9eae7b07a60e490c85ab54abb66659fc61bfcd9" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ + "bitflags 2.4.1", "indexmap 2.1.0", "semver", ] [[package]] name = "wasmparser" -version = "0.121.2" +version = "0.200.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" +checksum = "a03f65ac876612140c57ff6c3b8fe4990067cce97c2cfdb07368a3cc3354b062" dependencies = [ "bitflags 2.4.1", "indexmap 2.1.0", @@ -2319,20 +2324,21 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.2.75" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d027eb8294904fc715ac0870cebe6b0271e96b90605ee21511e7565c4ce568c" +checksum = "60e73986a6b7fdfedb7c5bf9e7eb71135486507c8fbc4c0c42cffcb6532988b7" dependencies = [ "anyhow", - "wasmparser 0.118.1", + "wasmparser 0.121.2", ] [[package]] name = "wasmtime" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb6aa966be38f613954c3debe7ba6c7a02ffd0537432be438da0b038955cdf" +checksum = "b06f80b13fdeba0ea5267813d0f06af822309f7125fc8db6094bcd485f0a4ae7" dependencies = [ + "addr2line", "anyhow", "async-trait", "bincode", @@ -2340,26 +2346,30 @@ dependencies = [ "cfg-if", "encoding_rs", "fxprof-processed-profile", + "gimli 0.28.1", "indexmap 2.1.0", + "ittapi", "libc", "log", "object", "once_cell", "paste", "rayon", + "rustix", "serde", "serde_derive", "serde_json", "target-lexicon", - "wasm-encoder 0.38.1", - "wasmparser 0.118.1", + "wasm-encoder 0.41.2", + "wasmparser 0.121.2", "wasmtime-cache", "wasmtime-component-macro", "wasmtime-component-util", "wasmtime-cranelift", "wasmtime-environ", "wasmtime-fiber", - "wasmtime-jit", + "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", "wasmtime-runtime", "wasmtime-winch", "wat", @@ -2368,18 +2378,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1495ef4d46aec14f967b672e946e391dd8a14a443cda3d5e0779ff67fb6e28d" +checksum = "19d7395b475c6f858c7edfce375f00d8282a32fbf5d1ebc93eddfac5c2458a52" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2de1b065bdbaca3df9e7e9f70eb129e326a99d971b16d666acd798d98d47635" +checksum = "c0a78f86b27f099bea3aaa0894464e22e84a08cadf3d8cd353378d3d15385535" dependencies = [ "anyhow", "base64", @@ -2397,9 +2407,9 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f19bcff82f81ba0273c0b68f3909977b0dd54489bc86c630d8aad43dca92f3f" +checksum = "93e54483c542e304e17fa73d3f9263bf071e21915c8f048c7d42916da5b4bfd6" dependencies = [ "anyhow", "proc-macro2", @@ -2412,15 +2422,15 @@ dependencies = [ [[package]] name = "wasmtime-component-util" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8af072b7ad5ac5583e1f9e4737ebf88923de564fb5d4ace0ca9b4b720bdf95a1" +checksum = "2c9f72619f484df95fc03162cdef9cb98778abc4103811849501bb34e79a3aac" [[package]] name = "wasmtime-cranelift" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df08a8bd9a68732577bee05ac685e4c247238b5e79ad9c062e2dfb4d04dca132" +checksum = "974d9455611e26c97d31705e19545de58fa8867416592bd93b7a54a7fc37cedb" dependencies = [ "anyhow", "cfg-if", @@ -2435,7 +2445,7 @@ dependencies = [ "object", "target-lexicon", "thiserror", - "wasmparser 0.118.1", + "wasmparser 0.121.2", "wasmtime-cranelift-shared", "wasmtime-environ", "wasmtime-versioned-export-macros", @@ -2443,9 +2453,9 @@ dependencies = [ [[package]] name = "wasmtime-cranelift-shared" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "404201c9e669083f189f01337b3ed0aa0eb081157fb4e170bbfe193df9497771" +checksum = "40667ba458634db703aea3bd960e80bc9352c21d5e765b69f43e3b0c964eb611" dependencies = [ "anyhow", "cranelift-codegen", @@ -2459,22 +2469,25 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e696b4911c9a69c3c2892ec05eb41bb15436d1a46d8830a755c40f5df47546a" +checksum = "e8da991421528c2767053cb0cfa70b5d28279100dbcf70ed7f74b51abe1656ef" dependencies = [ "anyhow", + "bincode", + "cpp_demangle", "cranelift-entity", "gimli 0.28.1", "indexmap 2.1.0", "log", "object", + "rustc-demangle", "serde", "serde_derive", "target-lexicon", "thiserror", - "wasm-encoder 0.38.1", - "wasmparser 0.118.1", + "wasm-encoder 0.41.2", + "wasmparser 0.121.2", "wasmprinter", "wasmtime-component-util", "wasmtime-types", @@ -2482,9 +2495,9 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a39681c1f6f54d1bf7efe5dc829f8d7fc0e2ca12c346fd7a3efbf726e9681d2" +checksum = "6fdd780272515bfcdf316e2efe20231719ec40223d67fcdd7d17068a16d39384" dependencies = [ "anyhow", "cc", @@ -2495,38 +2508,11 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "wasmtime-jit" -version = "17.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c56519882d936c680bd191d58ac04cff071a470eca2dcc664adcd60f986a731" -dependencies = [ - "addr2line", - "anyhow", - "bincode", - "cfg-if", - "cpp_demangle", - "gimli 0.28.1", - "ittapi", - "log", - "object", - "rustc-demangle", - "rustix", - "serde", - "serde_derive", - "target-lexicon", - "wasmtime-environ", - "wasmtime-jit-debug", - "wasmtime-jit-icache-coherence", - "wasmtime-runtime", - "windows-sys 0.52.0", -] - [[package]] name = "wasmtime-jit-debug" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "babc65e64ab0dd4e1ce65624db64e24ed0fbdebb16148729173fa0da9f70e53c" +checksum = "87be9ed561dbe2aca3bde30d442c292fda53748343d0220873d1df65270c8fcf" dependencies = [ "object", "once_cell", @@ -2536,9 +2522,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7ec5b11c12d9acb09612e7ce04c4c8aea3e8dc79b2591ffdead986a5ce8ec49" +checksum = "3346431a41fbb0c5af0081c2322361b00289f2902e54ee7b115e9b2ad32b156b" dependencies = [ "cfg-if", "libc", @@ -2547,9 +2533,9 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28e1c31bbdf67cb86f149bcead5193749f23f77c93c5244ec9ac8d192f90966c" +checksum = "a489353aa297b46a66cde8da48cab8e1e967e7f4b0ae3d9889a0550bf274810b" dependencies = [ "anyhow", "cc", @@ -2565,7 +2551,7 @@ dependencies = [ "psm", "rustix", "sptr", - "wasm-encoder 0.38.1", + "wasm-encoder 0.41.2", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-fiber", @@ -2577,22 +2563,22 @@ dependencies = [ [[package]] name = "wasmtime-types" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e799cff634d30fd042db96b417d515e54f903b95f8c1e0ec60e8f604479485" +checksum = "12c56e31fd7fa707fbd7720b2b29ac42ccfb092fe9d85c98f1d3988f9a1d4558" dependencies = [ "cranelift-entity", "serde", "serde_derive", "thiserror", - "wasmparser 0.118.1", + "wasmparser 0.121.2", ] [[package]] name = "wasmtime-versioned-export-macros" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10fe166d4e4c95d5d80c5b47e1e12256af2099ac525ddb9a19b1aeb8896e5e1" +checksum = "6b0300976c36a9427d184e3ecf7c121c2cb3f030844faf9fcb767821e9d4c382" dependencies = [ "proc-macro2", "quote", @@ -2601,9 +2587,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494f99111a165dcddc69aaa5fa23604f49dcfab479a869edd84581abd6ac569b" +checksum = "8f7d9cfaf9f70e83a164f5d772e376fafa2d7b7b0ca2ef88f9bcaf8b2363a38b" dependencies = [ "anyhow", "async-trait", @@ -2618,7 +2604,6 @@ dependencies = [ "futures", "io-extras", "io-lifetimes", - "libc", "log", "once_cell", "rustix", @@ -2627,9 +2612,7 @@ dependencies = [ "tokio", "tracing", "url", - "wasi-cap-std-sync", "wasi-common", - "wasi-tokio", "wasmtime", "wiggle", "windows-sys 0.52.0", @@ -2637,16 +2620,16 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3f5d76d399cb4423e6f178bc154a0e1c314711e28dabaa6e757e56628a083ec" +checksum = "1f773a904d2bd5ecd8ad095f4c965ad56a836929d8c26368621f75328d500649" dependencies = [ "anyhow", "cranelift-codegen", "gimli 0.28.1", "object", "target-lexicon", - "wasmparser 0.118.1", + "wasmparser 0.121.2", "wasmtime-cranelift-shared", "wasmtime-environ", "winch-codegen", @@ -2654,9 +2637,9 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb3bc92c031cf4961135bffe055a69c1bd67c253dca20631478189bb05ec27b" +checksum = "ff6e9754e0a526238ea66da9ba21965a54846a2b22d9de89a298fb8998389507" dependencies = [ "anyhow", "heck 0.4.1", @@ -2666,9 +2649,9 @@ dependencies = [ [[package]] name = "wasmtime-wmemcheck" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da08ab734954e16f57be38423b90c25a0b13420e51cbd0a2e37b86a468a988c" +checksum = "acdf5b8da6ebf7549dad0cd32ca4a3a0461449ef4feec9d0d8450d8da9f51f9b" [[package]] name = "wast" @@ -2681,24 +2664,24 @@ dependencies = [ [[package]] name = "wast" -version = "71.0.1" +version = "200.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "647c3ac4354da32688537e8fc4d2fe6c578df51896298cb64727d98088a1fd26" +checksum = "d1810d14e6b03ebb8fb05eef4009ad5749c989b65197d83bce7de7172ed91366" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.41.2", + "wasm-encoder 0.200.0", ] [[package]] name = "wat" -version = "1.0.88" +version = "1.200.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69c36f634411568a2c6d24828b674961e37ea03340fe1d605c337ed8162d901" +checksum = "776cbd10e217f83869beaa3f40e312bb9e91d5eee29bbf6f560db1261b6a4c3d" dependencies = [ - "wast 71.0.1", + "wast 200.0.0", ] [[package]] @@ -2718,18 +2701,18 @@ dependencies = [ "rustyline", "tokio", "wasi-virt", - "wasm-compose", + "wasm-compose 0.200.0", "wasmtime", "wasmtime-wasi", - "wit-component", - "wit-parser 0.14.0", + "wit-component 0.200.0", + "wit-parser 0.200.0", ] [[package]] name = "wiggle" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd5b200b5dd3d5d7cc4093166f4f916d2d2839296cf1b1757b9726635f6425c3" +checksum = "454570f4fecadb881f0ba157e98b575a2850607a9eac79d8868f3ab70633f632" dependencies = [ "anyhow", "async-trait", @@ -2742,9 +2725,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4dc34a2bc1091599de005e9b854cd1a9ea35b16ca51cac2797274c1a2666e06" +checksum = "443ac1ebb753ca22bca98d01742762de1243ff722839907c35ea683a8264c74e" dependencies = [ "anyhow", "heck 0.4.1", @@ -2757,9 +2740,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "17.0.1" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ba3b37f402a7513b9ed7973a6e907074987b3afdcede98d3d79939b3e76f1b" +checksum = "9e9e2f1f06ae07bac15273774782c04ab14e9adfbf414762fc84dbbfcf7fb1ac" dependencies = [ "proc-macro2", "quote", @@ -2800,9 +2783,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.15.1" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d921185084e134e897e0e202e129a422306d0f1391954ecf4928d36defa897d" +checksum = "52f7eaac56988f986181099c15860946fea93ed826322a1f92c4ff04541b7744" dependencies = [ "anyhow", "cranelift-codegen", @@ -2810,7 +2793,7 @@ dependencies = [ "regalloc2", "smallvec", "target-lexicon", - "wasmparser 0.118.1", + "wasmparser 0.121.2", "wasmtime-environ", ] @@ -2988,11 +2971,30 @@ dependencies = [ "serde_derive", "serde_json", "wasm-encoder 0.41.2", - "wasm-metadata", + "wasm-metadata 0.10.20", "wasmparser 0.121.2", "wit-parser 0.14.0", ] +[[package]] +name = "wit-component" +version = "0.200.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39979723340baea490b87b11b2abae05f149d86f2b55c18d41d78a2a2b284c16" +dependencies = [ + "anyhow", + "bitflags 2.4.1", + "indexmap 2.1.0", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.200.0", + "wasm-metadata 0.200.0", + "wasmparser 0.200.0", + "wit-parser 0.200.0", +] + [[package]] name = "wit-parser" version = "0.13.2" @@ -3028,6 +3030,24 @@ dependencies = [ "wasmparser 0.121.2", ] +[[package]] +name = "wit-parser" +version = "0.200.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f717576b37f01c15696bda7f6f13868367b9c5913485f9f0ec8e59fd28c8e13" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.1.0", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.200.0", +] + [[package]] name = "witx" version = "0.9.1" diff --git a/Cargo.toml b/Cargo.toml index e084fb2..512684a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,9 +21,9 @@ rustyline = "13.0.0" colored = "2" tokio = { version = "1.36.0", features = ["macros"] } -wasmtime = { version = "17.0.1", features = [ "component-model", ] } -wasmtime-wasi = { version = "17.0.1", features = [ "tokio", ] } +wasmtime = { version = "18.0.1", features = [ "component-model", ] } +wasmtime-wasi = { version = "18.0.1", features = [ "tokio", ] } wasi-virt = { git = "https://github.com/bytecodealliance/WASI-Virt", rev = "fd2fae04342ea58aab2426ca041da68be046b030" } -wit-component = "0.21.0" -wit-parser = "0.14.0" -wasm-compose = "0.5.5" +wit-component = "0.200.0" +wit-parser = "0.200.0" +wasm-compose = "0.200.0" diff --git a/src/runtime.rs b/src/runtime.rs index 8d9917c..348fb14 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -418,7 +418,7 @@ impl Subscribe for ImportImplStdout { #[async_trait::async_trait] impl StdoutStream for ImportImplStdout { - fn stream(&self) -> Box<(dyn wasmtime_wasi::preview2::HostOutputStream + 'static)> { + fn stream(&self) -> Box<(dyn HostOutputStream + 'static)> { Stdout.stream() } @@ -448,19 +448,11 @@ impl Context { } impl WasiView for Context { - fn table(&self) -> &ResourceTable { - &self.table - } - - fn table_mut(&mut self) -> &mut ResourceTable { + fn table(&mut self) -> &mut ResourceTable { &mut self.table } - fn ctx(&self) -> &WasiCtx { - &self.wasi - } - - fn ctx_mut(&mut self) -> &mut WasiCtx { + fn ctx(&mut self) -> &mut WasiCtx { &mut self.wasi } } @@ -488,19 +480,11 @@ impl ImportImplsContext { } impl WasiView for ImportImplsContext { - fn table(&self) -> &ResourceTable { - &self.table - } - - fn table_mut(&mut self) -> &mut ResourceTable { + fn table(&mut self) -> &mut ResourceTable { &mut self.table } - fn ctx(&self) -> &WasiCtx { - &self.wasi - } - - fn ctx_mut(&mut self) -> &mut WasiCtx { + fn ctx(&mut self) -> &mut WasiCtx { &mut self.wasi } }