From fbbc1fdf561d88c97d66ebcf32ed0eeb837ef230 Mon Sep 17 00:00:00 2001 From: Zelzahn Date: Sat, 15 Jun 2024 09:21:31 +0200 Subject: [PATCH] update wastime version --- wasmtime/host/Cargo.lock | 381 +++++++++++++----------------------- wasmtime/host/Cargo.toml | 17 +- wasmtime/host/src/device.rs | 3 +- wasmtime/host/src/lib.rs | 2 +- 4 files changed, 156 insertions(+), 247 deletions(-) diff --git a/wasmtime/host/Cargo.lock b/wasmtime/host/Cargo.lock index 75985fa..7c65b5c 100644 --- a/wasmtime/host/Cargo.lock +++ b/wasmtime/host/Cargo.lock @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "once_cell", @@ -105,7 +105,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object", + "object 0.32.2", "rustc-demangle", ] @@ -115,15 +115,6 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -314,6 +305,12 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +[[package]] +name = "cobs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" + [[package]] name = "core-foundation-sys" version = "0.8.6" @@ -340,18 +337,18 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.106.0" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a535eb1cf5a6003197dc569320c40c1cb2d2f97ef5d5348eebf067f20957381" +checksum = "29daf137addc15da6bab6eae2c4a11e274b1d270bf2759508e62f6145e863ef6" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.106.0" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b5066db32cec1492573827183af2142d2d88fe85a83cfc9e73f0f63d3788d4" +checksum = "de619867d5de4c644b7fd9904d6e3295269c93d8a71013df796ab338681222d4" dependencies = [ "bumpalo", "cranelift-bforest", @@ -364,39 +361,40 @@ dependencies = [ "hashbrown 0.14.3", "log", "regalloc2", + "rustc-hash", "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.106.0" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64942e5774308e835fbad4dd25f253105412c90324631910e1ec27963147bddb" +checksum = "29f5cf277490037d8dae9513d35e0ee8134670ae4a964a5ed5b198d4249d7c10" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.106.0" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39c33db9a86dd6d8d04166a10c53deb477aeea3500eaaefca682e4eda9bb986" +checksum = "8c3e22ecad1123343a3c09ac6ecc532bb5c184b6fcb7888df0ea953727f79924" [[package]] name = "cranelift-control" -version = "0.106.0" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b7fc4937613aea3156a0538800a17bf56f345a5da2e79ae3df58488c93d867f" +checksum = "53ca3ec6d30bce84ccf59c81fead4d16381a3ef0ef75e8403bc1e7385980da09" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.106.0" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f85575e79a153ce1ddbfb7fe1813519b4bfe1eb200cc9c8353b45ad123ae4d36" +checksum = "7eabb8d36b0ca8906bec93c78ea516741cac2d7e6b266fa7b0ffddcc09004990" dependencies = [ "serde", "serde_derive", @@ -404,9 +402,9 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.106.0" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbc31d6c0ab2249fe0c21e988256b42f5f401ab2673b4fc40076c82a698bdfb9" +checksum = "44b42630229e49a8cfcae90bdc43c8c4c08f7a7aa4618b67f79265cd2f996dd2" dependencies = [ "cranelift-codegen", "log", @@ -416,15 +414,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.106.0" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc14f37e3314c0e4c53779c2f46753bf242efff76ee9473757a1fff3b495ad37" +checksum = "918d1e36361805dfe0b6cdfd5a5ffdb5d03fa796170c5717d2727cbe623b93a0" [[package]] name = "cranelift-native" -version = "0.106.0" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ea5375f76ab31f9800a23fb2b440810286a6f669a3eb467cdd7ff255ea64268" +checksum = "75aea85a0d7e1800b14ce9d3f53adf8ad4d1ee8a9e23b0269bdc50285e93b9b3" dependencies = [ "cranelift-codegen", "libc", @@ -433,9 +431,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.106.0" +version = "0.108.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79851dba01b1fa83fad95134aa27beca88dc4b027121d92ab19788582389dc5f" +checksum = "dac491fd3473944781f0cf9528c90cc899d18ad438da21961a839a3a44d57dfb" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -533,15 +531,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "debugid" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" -dependencies = [ - "uuid", -] - [[package]] name = "dhat" version = "0.3.3" @@ -631,6 +620,12 @@ dependencies = [ "nb", ] +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + [[package]] name = "encoding_rs" version = "0.8.33" @@ -754,28 +749,6 @@ dependencies = [ "pin-utils", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "fxprof-processed-profile" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" -dependencies = [ - "bitflags 2.4.2", - "debugid", - "fxhash", - "serde", - "serde_json", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -1002,26 +975,6 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" -[[package]] -name = "ittapi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b996fe614c41395cdaedf3cf408a9534851090959d90d54a535f675550b64b1" -dependencies = [ - "anyhow", - "ittapi-sys", - "log", -] - -[[package]] -name = "ittapi-sys" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f5385394064fa2c886205dba02598013ce83d3e92d33dbdc0c52fe0e7bf4fc" -dependencies = [ - "cc", -] - [[package]] name = "jobserver" version = "0.1.28" @@ -1058,6 +1011,12 @@ version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "libredox" version = "0.0.1" @@ -1109,15 +1068,6 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "mach" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" -dependencies = [ - "libc", -] - [[package]] name = "mach2" version = "0.4.2" @@ -1268,6 +1218,15 @@ name = "object" version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "object" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8dd6c0cdf9429bce006e1362bfce61fa1bfd8c898a643ed8d2b471934701d3d" dependencies = [ "crc32fast", "hashbrown 0.14.3", @@ -1368,6 +1327,17 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "postcard" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8" +dependencies = [ + "cobs", + "embedded-io", + "serde", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1656,6 +1626,9 @@ name = "smallvec" version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +dependencies = [ + "serde", +] [[package]] name = "socket2" @@ -1900,12 +1873,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - [[package]] name = "unicode-xid" version = "0.2.4" @@ -1923,12 +1890,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "uuid" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" - [[package]] name = "version_check" version = "0.9.4" @@ -2007,29 +1968,31 @@ checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-encoder" -version = "0.201.0" +version = "0.207.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9c7d2731df60006819b013f64ccc2019691deccf6e11a1804bc850cd6748f1a" +checksum = "d996306fb3aeaee0d9157adbe2f670df0236caf19f6728b221e92d0f27b3fe17" dependencies = [ "leb128", ] [[package]] name = "wasmparser" -version = "0.201.0" +version = "0.207.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84e5df6dba6c0d7fafc63a450f1738451ed7a0b52295d83e868218fa286bf708" +checksum = "e19bb9f8ab07616da582ef8adb24c54f1424c7ec876720b7da9db8ec0626c92c" dependencies = [ + "ahash", "bitflags 2.4.2", + "hashbrown 0.14.3", "indexmap", "semver", ] [[package]] name = "wasmprinter" -version = "0.201.0" +version = "0.207.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a67e66da702706ba08729a78e3c0079085f6bfcb1a62e4799e97bbf728c2c265" +checksum = "9c2d8a7b4dabb460208e6b4334d9db5766e84505038b2529e69c3d07ac619115" dependencies = [ "anyhow", "wasmparser", @@ -2037,35 +2000,42 @@ dependencies = [ [[package]] name = "wasmtime" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a08af88fa3d324cc5cf6d388d90ef396a787b3fb4bbd51ba185f8645dc0f02c" +checksum = "f92a1370c66a0022e6d92dcc277e2c84f5dece19569670b8ce7db8162560d8b6" dependencies = [ "addr2line", "anyhow", "async-trait", - "bincode", "bumpalo", + "cc", "cfg-if", "encoding_rs", - "fxprof-processed-profile", "gimli", + "hashbrown 0.14.3", "indexmap", - "ittapi", "libc", + "libm", "log", - "object", + "mach2", + "memfd", + "memoffset 0.9.0", + "object 0.33.0", "once_cell", "paste", + "postcard", + "psm", "rayon", "rustix", "semver", "serde", "serde_derive", - "serde_json", + "smallvec", + "sptr", "target-lexicon", "wasm-encoder", "wasmparser", + "wasmtime-asm-macros", "wasmtime-cache", "wasmtime-component-macro", "wasmtime-component-util", @@ -2074,33 +2044,32 @@ 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", ] [[package]] name = "wasmtime-asm-macros" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16cdbfcf28542bcda0b5fd68d44603e53e5ad126cbe7b9f25c130e1249fd8211" +checksum = "6dee8679c974a7f258c03d60d3c747c426ed219945b6d08cbc77fd2eab15b2d1" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "546b85be1a1d380ba821aeb0252b656359d0ce027b16fef8fc0e2f2b9159e193" +checksum = "b00103ffaf7ee980f4e750fe272b6ada79d9901659892e457c7ca316b16df9ec" dependencies = [ "anyhow", "base64", - "bincode", "directories-next", "log", + "postcard", "rustix", "serde", "serde_derive", @@ -2112,9 +2081,9 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cdcf690257c623506eeec3a502864b282aab0fdfd6981c1ebb63c7e98f4a23a" +checksum = "32cae30035f1cf97dcc6657c979cf39f99ce6be93583675eddf4aeaa5548509c" dependencies = [ "anyhow", "proc-macro2", @@ -2127,15 +2096,15 @@ dependencies = [ [[package]] name = "wasmtime-component-util" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3ae7bf66e2fae1e332ab3634f332d7422e878a6eecc47c8f8f78cc1f24e501" +checksum = "f7ae611f08cea620c67330925be28a96115bf01f8f393a6cbdf4856a86087134" [[package]] name = "wasmtime-cranelift" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ea025c969a09117818732fa6f96848e858a7953d4659dab8081a6eea3c0523" +checksum = "b2909406a6007e28be964067167890bca4574bd48a9ff18f1fa9f4856d89ea40" dependencies = [ "anyhow", "cfg-if", @@ -2147,50 +2116,32 @@ dependencies = [ "cranelift-wasm", "gimli", "log", - "object", + "object 0.33.0", "target-lexicon", "thiserror", "wasmparser", - "wasmtime-cranelift-shared", "wasmtime-environ", "wasmtime-versioned-export-macros", ] -[[package]] -name = "wasmtime-cranelift-shared" -version = "19.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcd6dd2f8d8d4860b384f61f89b597633a5b5f0943c546210e5084c5d321fe20" -dependencies = [ - "anyhow", - "cranelift-codegen", - "cranelift-control", - "cranelift-native", - "gimli", - "object", - "target-lexicon", - "wasmtime-environ", -] - [[package]] name = "wasmtime-environ" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f60f3f717658dd77745de03b750d5852126e9be6dad465848c77f90387c44c9" +checksum = "40e227f9ed2f5421473723d6c0352b5986e6e6044fde5410a274a394d726108f" dependencies = [ "anyhow", - "bincode", "cpp_demangle", "cranelift-entity", "gimli", "indexmap", "log", - "object", + "object 0.33.0", + "postcard", "rustc-demangle", "serde", "serde_derive", "target-lexicon", - "thiserror", "wasm-encoder", "wasmparser", "wasmprinter", @@ -2200,9 +2151,9 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf8cd22ab1041bf0e54b6283e57824557902e4fed8b1f3a7eef29cbaba89eebf" +checksum = "42edb392586d07038c1638e854382db916b6ca7845a2e6a7f8dc49e08907acdd" dependencies = [ "anyhow", "cc", @@ -2215,11 +2166,11 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8753654f698354950a557d0d0cbdecf356c973659920091cf3d5fada74183e02" +checksum = "95b26ef7914af0c0e3ca811bdc32f5f66fbba0fd21e1f8563350e8a7951e3598" dependencies = [ - "object", + "object 0.33.0", "once_cell", "rustix", "wasmtime-versioned-export-macros", @@ -2227,69 +2178,40 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" -version = "19.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796e4b4989db62899d2117e1e0258b839d088c044591b14e3a0396e7b3ae53a" -dependencies = [ - "cfg-if", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "wasmtime-runtime" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf2b7745df452a4f41b9aab21d3f7ba1347b12da2fdc5241e59306127884a68" +checksum = "afe088f9b56bb353adaf837bf7e10f1c2e1676719dd5be4cac8e37f2ba1ee5bc" dependencies = [ "anyhow", - "cc", "cfg-if", - "encoding_rs", - "indexmap", "libc", - "log", - "mach", - "memfd", - "memoffset 0.9.0", - "paste", - "psm", - "rustix", - "sptr", - "wasm-encoder", - "wasmtime-asm-macros", - "wasmtime-environ", - "wasmtime-fiber", - "wasmtime-jit-debug", - "wasmtime-versioned-export-macros", - "wasmtime-wmemcheck", "windows-sys 0.52.0", ] [[package]] name = "wasmtime-slab" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83448ef600ad95977019ebaea84a5516fdbc9561d0a8e26b1e099351f993b527" +checksum = "4ff75cafffe47b04b036385ce3710f209153525b0ed19d57b0cf44a22d446460" [[package]] name = "wasmtime-types" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf6fe7ed3fd18ed4b1e4465fe5c8674acc9f03523fca5b1b9f975b2560cd741b" +checksum = "2f2fa462bfea3220711c84e2b549f147e4df89eeb49b8a2a3d89148f6cc4a8b1" dependencies = [ "cranelift-entity", "serde", "serde_derive", - "thiserror", + "smallvec", "wasmparser", ] [[package]] name = "wasmtime-versioned-export-macros" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d6d967f01032da7d4c6303da32f6a00d5efe1bac124b156e7342d8ace6ffdfc" +checksum = "d4cedc5bfef3db2a85522ee38564b47ef3b7fc7c92e94cacbce99808e63cdd47" dependencies = [ "proc-macro2", "quote", @@ -2298,9 +2220,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "371d828b6849ea06d598ae7dd1c316e8dd9e99b76f77d93d5886cb25c7f8e188" +checksum = "bdbbe94245904d4c96c7c5f7b55bad896cc27908644efd9442063c0748b631fc" dependencies = [ "anyhow", "async-trait", @@ -2329,26 +2251,26 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb8b3fcbc455105760e4a2aa8ee3f39b8357183a62201383b3f72d4836ca2be8" +checksum = "97b27054fed6be4f3800aba5766f7ef435d4220ce290788f021a08d4fa573108" dependencies = [ "anyhow", "cranelift-codegen", "gimli", - "object", + "object 0.33.0", "target-lexicon", "wasmparser", - "wasmtime-cranelift-shared", + "wasmtime-cranelift", "wasmtime-environ", "winch-codegen", ] [[package]] name = "wasmtime-wit-bindgen" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96326c9800fb6c099f50d1bd2126d636fc2f96950e1675acf358c0f52516cd38" +checksum = "c936a52ce69c28de2aa3b5fb4f2dbbb2966df304f04cccb7aca4ba56d915fda0" dependencies = [ "anyhow", "heck", @@ -2356,12 +2278,6 @@ dependencies = [ "wit-parser", ] -[[package]] -name = "wasmtime-wmemcheck" -version = "19.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36bd91a4dc55af0bf55e9e2ab0ea13724cfb5c5a1acdf8873039769208f59490" - [[package]] name = "wast" version = "35.0.2" @@ -2371,28 +2287,6 @@ dependencies = [ "leb128", ] -[[package]] -name = "wast" -version = "201.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef6e1ef34d7da3e2b374fd2b1a9c0227aff6cad596e1b24df9b58d0f6222faa" -dependencies = [ - "bumpalo", - "leb128", - "memchr", - "unicode-width", - "wasm-encoder", -] - -[[package]] -name = "wat" -version = "1.201.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453d5b37a45b98dee4f4cb68015fc73634d7883bbef1c65e6e9c78d454cf3f32" -dependencies = [ - "wast 201.0.0", -] - [[package]] name = "web-sys" version = "0.3.69" @@ -2405,9 +2299,9 @@ dependencies = [ [[package]] name = "wiggle" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1136a209614ace00b0c11f04dc7cf42540773be3b22eff6ad165110aba29c1" +checksum = "a89ea6f74ece6d1cfbd089783006b8eb69a0219ca83cad22068f0d9fa9df3f91" dependencies = [ "anyhow", "async-trait", @@ -2420,9 +2314,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2bd99ce26046f4246d720a4198f6a8fc95bc5da82ae4ef62263e24641c3076" +checksum = "36beda94813296ecaf0d91b7ada9da073fd41865ba339bdd3b7764e2e785b8e9" dependencies = [ "anyhow", "heck", @@ -2435,9 +2329,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "19.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512d816dbcd0113103b2eb2402ec9018e7f0755202a5b3e67db726f229d8dcae" +checksum = "0b47d2b4442ce93106dba5d1a9c59d5f85b5732878bb3d0598d3c93c0d01b16b" dependencies = [ "proc-macro2", "quote", @@ -2478,9 +2372,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.17.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d285c833af9453c037cd220765f86c5c9961e8906a815829107c8801d535b8e4" +checksum = "1dc69899ccb2da7daa4df31426dcfd284b104d1a85e1dae35806df0c46187f87" dependencies = [ "anyhow", "cranelift-codegen", @@ -2489,6 +2383,7 @@ dependencies = [ "smallvec", "target-lexicon", "wasmparser", + "wasmtime-cranelift", "wasmtime-environ", ] @@ -2654,9 +2549,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.201.0" +version = "0.207.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196d3ecfc4b759a8573bf86a9b3f8996b304b3732e4c7de81655f875f6efdca6" +checksum = "78c83dab33a9618d86cfe3563cc864deffd08c17efc5db31a3b7cd1edeffe6e1" dependencies = [ "anyhow", "id-arena", @@ -2679,7 +2574,7 @@ dependencies = [ "anyhow", "log", "thiserror", - "wast 35.0.2", + "wast", ] [[package]] diff --git a/wasmtime/host/Cargo.toml b/wasmtime/host/Cargo.toml index 69a992b..48ea6cc 100644 --- a/wasmtime/host/Cargo.toml +++ b/wasmtime/host/Cargo.toml @@ -7,8 +7,21 @@ edition = "2021" [dependencies] anyhow = "1.0.75" -wasmtime = "19.0.0" -wasmtime-wasi = "19.0.0" +wasmtime = { version = "21.0.0", default-features = false, features = [ + 'cache', + 'gc', + 'parallel-compilation', + 'cranelift', + 'pooling-allocator', + 'demangle', + 'addr2line', + 'coredump', + 'debug-builtins', + 'runtime', + 'component-model', + 'threads' +]} +wasmtime-wasi = "21.0.0" embedded-hal = "1.0.0" linux-embedded-hal = "0.4.0" i2cdev = "0.6.0" diff --git a/wasmtime/host/src/device.rs b/wasmtime/host/src/device.rs index 9dd5e40..97ae68c 100644 --- a/wasmtime/host/src/device.rs +++ b/wasmtime/host/src/device.rs @@ -16,7 +16,8 @@ bindgen!({ with: { "wasi:i2c/delay/delay": device::Delay, "wasi:i2c/i2c/i2c": device::I2c, - } + }, + trappable_imports: true }); pub trait Device { diff --git a/wasmtime/host/src/lib.rs b/wasmtime/host/src/lib.rs index b2fd39e..fb1434e 100644 --- a/wasmtime/host/src/lib.rs +++ b/wasmtime/host/src/lib.rs @@ -19,7 +19,7 @@ pub enum Guest { pub fn execute(guest: Guest, option: Option<&str>) -> Result { let engine = Engine::new(Config::new().wasm_component_model(true))?; - let mut linker = Linker::new(&engine); + let linker = Linker::new(&engine); // Bind wasi commmand world // wasmtime_wasi::command::sync::add_to_linker(&mut linker)?;