diff --git a/Cargo.lock b/Cargo.lock index 24854371e3d..978d56caa35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,11 +4,11 @@ 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 0.28.1", + "gimli 0.29.0", ] [[package]] @@ -314,7 +314,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.36.4", + "object", "rustc-demangle", "windows-targets 0.52.6", ] @@ -752,6 +752,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "cobs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" + [[package]] name = "colorchoice" version = "1.0.2" @@ -829,9 +835,9 @@ 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", ] @@ -847,73 +853,86 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.102.1" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e7e56668d2263f92b691cb9e4a2fcb186ca0384941fe420484322fa559c3329" +checksum = "7b765ed4349e66bedd9b88c7691da42e24c7f62067a6be17ddffa949367b6e17" dependencies = [ "cranelift-entity", ] +[[package]] +name = "cranelift-bitset" +version = "0.112.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eaa2aece6237198afd32bff57699e08d4dccb8d3902c214fc1e6ba907247ca4" +dependencies = [ + "serde", + "serde_derive", +] + [[package]] name = "cranelift-codegen" -version = "0.102.1" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a9ff61938bf11615f55b80361288c68865318025632ea73c65c0b44fa16283c" +checksum = "351824439e59d42f0e4fa5aac1d13deded155120043565769e55cd4ad3ca8ed9" dependencies = [ "bumpalo", "cranelift-bforest", + "cranelift-bitset", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli 0.28.1", + "gimli 0.29.0", "hashbrown 0.14.5", "log", "regalloc2", + "rustc-hash", "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.102.1" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50656bf19e3d4a153b404ff835b8b59e924cfa3682ebe0d3df408994f37983f6" +checksum = "5a0ce0273d7a493ef8f31f606849a4e931c19187a4923f5f87fc1f2b13109981" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.102.1" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388041deeb26109f1ea73c1812ea26bfd406c94cbce0bb5230aa44277e43b209" +checksum = "0f72016ac35579051913f4f07f6b36c509ed69412d852fd44c8e1d7b7fa6d92a" [[package]] name = "cranelift-control" -version = "0.102.1" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39b7c512ffac527e5b5df9beae3d67ab85d07dca6d88942c16195439fedd1d3" +checksum = "db28951d21512c4fd0554ef179bfb11e4eb6815062957a9173824eee5de0c46c" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.102.1" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb25f573701284fe2bcf88209d405342125df00764b396c923e11eafc94d892" +checksum = "14ebe592a2f81af9237cf9be29dd3854ecb72108cfffa59e85ef12389bf939e3" dependencies = [ + "cranelift-bitset", "serde", "serde_derive", ] [[package]] name = "cranelift-frontend" -version = "0.102.1" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57374fd11d72cf9ffb85ff64506ed831440818318f58d09f45b4185e5e9c376" +checksum = "4437db9d60c7053ac91ded0802740c2ccf123ee6d6898dd906c34f8c530cd119" dependencies = [ "cranelift-codegen", "log", @@ -923,15 +942,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.102.1" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae769b235f6ea2f86623a3ff157cc04a4ff131dc9fe782c2ebd35f272043581e" +checksum = "230cb33572b9926e210f2ca28145f2bc87f389e1456560932168e2591feb65c1" [[package]] name = "cranelift-native" -version = "0.102.1" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dc7bfb8f13a0526fe20db338711d9354729b861c336978380bb10f7f17dd207" +checksum = "364524ac7aef7070b1141478724abebeec297d4ea1e87ad8b8986465e91146d9" dependencies = [ "cranelift-codegen", "libc", @@ -940,14 +959,14 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.102.1" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c5f41a4af931b756be05af0dd374ce200aae2d52cea16b0beb07e8b52732c35" +checksum = "0572cbd9d136a62c0f39837b6bce3b0978b96b8586794042bec0c214668fd6f5" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools 0.10.5", + "itertools 0.12.1", "log", "smallvec", "wasmparser", @@ -1343,6 +1362,18 @@ dependencies = [ "serde", ] +[[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 = "encode_unicode" version = "0.3.6" @@ -1746,9 +1777,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 0.3.0", "indexmap 2.6.0", @@ -1805,15 +1836,6 @@ dependencies = [ "ahash 0.7.8", ] -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.11", -] - [[package]] name = "hashbrown" version = "0.14.5" @@ -1822,6 +1844,7 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", "allocator-api2", + "serde", ] [[package]] @@ -2132,6 +2155,12 @@ dependencies = [ "cc", ] +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + [[package]] name = "ident_case" version = "1.0.1" @@ -2455,10 +2484,10 @@ dependencies = [ ] [[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", ] @@ -2518,15 +2547,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - [[package]] name = "mimalloc" version = "0.1.43" @@ -2743,9 +2763,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[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.5", @@ -2753,15 +2773,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "object" -version = "0.36.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" -dependencies = [ - "memchr", -] - [[package]] name = "once_cell" version = "1.19.0" @@ -3077,6 +3088,18 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "postcard" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7f0a8d620d71c457dd1d47df76bb18960378da56af4527aaa10f515eee732e" +dependencies = [ + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "serde", +] + [[package]] name = "postgres-derive" version = "0.4.6" @@ -3484,11 +3507,11 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.9.3" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" +checksum = "12908dbeb234370af84d0579b9f68258a0f67e201412dd9a2814e6f45b2fc0f0" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.5", "log", "rustc-hash", "slice-group-by", @@ -3730,9 +3753,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustc_version" @@ -4233,6 +4256,9 @@ name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "socket2" @@ -6065,9 +6091,9 @@ checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-encoder" -version = "0.36.2" +version = "0.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "822b645bf4f2446b949776ffca47e2af60b167209ffb70814ef8779d299cd421" +checksum = "7b88b0814c9a2b323a9b46c687e726996c255ac8b64aa237dd11c81ed4854760" dependencies = [ "leb128", ] @@ -6113,78 +6139,128 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.116.1" +version = "0.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a58e28b80dd8340cb07b8242ae654756161f6fc8d0038123d679b7b99964fa50" +checksum = "ca917a21307d3adf2b9857b94dd05ebf8496bdcff4437a9b9fb3899d3e6c74e7" dependencies = [ + "ahash 0.8.11", + "bitflags 2.6.0", + "hashbrown 0.14.5", "indexmap 2.6.0", "semver", + "serde", +] + +[[package]] +name = "wasmprinter" +version = "0.217.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dc568b3e0d47e8f96ea547c90790cfa783f0205160c40de894a427114185ce" +dependencies = [ + "anyhow", + "termcolor", + "wasmparser", ] [[package]] name = "wasmtime" -version = "15.0.1" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642e12d108e800215263e3b95972977f473957923103029d7d617db701d67ba4" +checksum = "ef01f9cb9636ed42a7ec5a09d785c0643590199dc7372dc22c7e2ba7a31a97d4" dependencies = [ + "addr2line 0.22.0", "anyhow", - "bincode", + "bitflags 2.6.0", "bumpalo", + "cc", "cfg-if", + "gimli 0.29.0", + "hashbrown 0.14.5", "indexmap 2.6.0", "libc", + "libm", "log", - "object 0.32.2", + "mach2", + "memfd", + "object", "once_cell", "paste", + "postcard", "psm", + "rayon", + "rustix", "serde", "serde_derive", - "serde_json", + "smallvec", + "sptr", "target-lexicon", "wasmparser", + "wasmtime-asm-macros", "wasmtime-cache", + "wasmtime-component-macro", "wasmtime-cranelift", "wasmtime-environ", - "wasmtime-jit", - "wasmtime-runtime", - "windows-sys 0.48.0", + "wasmtime-jit-icache-coherence", + "wasmtime-slab", + "wasmtime-versioned-export-macros", + "windows-sys 0.52.0", ] [[package]] name = "wasmtime-asm-macros" -version = "15.0.1" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beada8bb15df52503de0a4c58de4357bfd2f96d9a44a6e547bad11efdd988b47" +checksum = "ba5b20797419d6baf2296db2354f864e8bb3447cacca9d151ce7700ae08b4460" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "15.0.1" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aba5bf44d044d25892c03fb3534373936ee204141ff92bac8297787ac7f22318" +checksum = "272d5939e989c5b54e3fa83ef420e4a6dba3995c3065626066428b2f73ad1e06" dependencies = [ "anyhow", "base64 0.21.7", - "bincode", "directories-next", "log", + "postcard", "rustix", "serde", "serde_derive", "sha2", - "toml 0.5.11", - "windows-sys 0.48.0", + "toml 0.8.19", + "windows-sys 0.52.0", "zstd", ] +[[package]] +name = "wasmtime-component-macro" +version = "25.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26593c4b18c76ca3c3fbdd813d6692256537b639b851d8a6fe827e3d6966fc01" +dependencies = [ + "anyhow", + "proc-macro2", + "quote", + "syn 2.0.77", + "wasmtime-component-util", + "wasmtime-wit-bindgen", + "wit-parser", +] + +[[package]] +name = "wasmtime-component-util" +version = "25.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2ed562fbb0cbed20a56c369c8de146c1de06a48c19e26ed9aa45f073514ee60" + [[package]] name = "wasmtime-cranelift" -version = "15.0.1" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe2e7532f1d6adbcc57e69bb6a7c503f0859076d07a9b4b6aabe8021ff8a05fd" +checksum = "f389b789cbcb53a8499131182135dea21d7d97ad77e7fb66830f69479ef0e68c" dependencies = [ "anyhow", "cfg-if", @@ -6194,145 +6270,79 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.28.1", + "gimli 0.29.0", "log", - "object 0.32.2", + "object", + "smallvec", "target-lexicon", "thiserror", "wasmparser", - "wasmtime-cranelift-shared", "wasmtime-environ", "wasmtime-versioned-export-macros", ] -[[package]] -name = "wasmtime-cranelift-shared" -version = "15.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c98d5378a856cbf058d36278627dfabf0ed68a888142958c7ae8e6af507dafa" -dependencies = [ - "anyhow", - "cranelift-codegen", - "cranelift-control", - "cranelift-native", - "gimli 0.28.1", - "object 0.32.2", - "target-lexicon", - "wasmtime-environ", -] - [[package]] name = "wasmtime-environ" -version = "15.0.1" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6d33a9f421da810a070cd56add9bc51f852bd66afbb8b920489d6242f15b70e" +checksum = "84b72debe8899f19bedf66f7071310f06ef62de943a1369ba9b373613e77dd3d" dependencies = [ "anyhow", + "cpp_demangle", + "cranelift-bitset", "cranelift-entity", - "gimli 0.28.1", + "gimli 0.29.0", "indexmap 2.6.0", "log", - "object 0.32.2", + "object", + "postcard", + "rustc-demangle", "serde", "serde_derive", "target-lexicon", - "thiserror", + "wasm-encoder", "wasmparser", + "wasmprinter", "wasmtime-types", ] -[[package]] -name = "wasmtime-jit" -version = "15.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d0994a86d6dca5f7d9740d7f2bd0568be06d2014a550361dc1c397d289d81ef" -dependencies = [ - "addr2line 0.21.0", - "anyhow", - "bincode", - "cfg-if", - "cpp_demangle", - "gimli 0.28.1", - "log", - "object 0.32.2", - "rustc-demangle", - "rustix", - "serde", - "serde_derive", - "target-lexicon", - "wasmtime-environ", - "wasmtime-jit-icache-coherence", - "wasmtime-runtime", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasmtime-jit-debug" -version = "15.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0c4b74e606d1462d648631d5bc328e3d5b14e7f9d3ff93bc6db062fb8c5cd8" -dependencies = [ - "once_cell", - "wasmtime-versioned-export-macros", -] - [[package]] name = "wasmtime-jit-icache-coherence" -version = "15.0.1" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3090a69ba1476979e090aa7ed4bc759178bafdb65b22f98b9ba24fc6e7e578d5" +checksum = "1d930bc1325bc0448be6a11754156d770f56f6c3a61f440e9567f36cd2ea3065" dependencies = [ + "anyhow", "cfg-if", "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] -name = "wasmtime-runtime" -version = "15.0.1" +name = "wasmtime-slab" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b993ac8380385ed67bf71b51b9553edcf1ab0801b78a805a067de581b9a3e88a" -dependencies = [ - "anyhow", - "cc", - "cfg-if", - "indexmap 2.6.0", - "libc", - "log", - "mach", - "memfd", - "memoffset", - "paste", - "rand 0.8.5", - "rustix", - "sptr", - "wasm-encoder", - "wasmtime-asm-macros", - "wasmtime-environ", - "wasmtime-jit-debug", - "wasmtime-versioned-export-macros", - "wasmtime-wmemcheck", - "windows-sys 0.48.0", -] +checksum = "055a181b8d03998511294faea14798df436503f14d7fd20edcf7370ec583e80a" [[package]] name = "wasmtime-types" -version = "15.0.1" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b5778112fcab2dc3d4371f4203ab8facf0c453dd94312b0a88dd662955e64e0" +checksum = "c8340d976673ac3fdacac781f2afdc4933920c1adc738c3409e825dab3955399" dependencies = [ + "anyhow", "cranelift-entity", "serde", "serde_derive", - "thiserror", + "smallvec", "wasmparser", ] [[package]] name = "wasmtime-versioned-export-macros" -version = "15.0.1" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50f51f8d79bfd2aa8e9d9a0ae7c2d02b45fe412e62ff1b87c0c81b07c738231" +checksum = "a4b0c1f76891f778db9602ee3fbb4eb7e9a3f511847d1fb1b69eddbcea28303c" dependencies = [ "proc-macro2", "quote", @@ -6340,10 +6350,16 @@ dependencies = [ ] [[package]] -name = "wasmtime-wmemcheck" -version = "15.0.1" +name = "wasmtime-wit-bindgen" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6060bc082cc32d9a45587c7640e29e3c7b89ada82677ac25d87850aaccb368" +checksum = "b2fca2cbb5bb390f65d4434c19bf8d9873dfc60f10802918ebcd6f819a38d703" +dependencies = [ + "anyhow", + "heck 0.4.1", + "indexmap 2.6.0", + "wit-parser", +] [[package]] name = "web-sys" @@ -6650,6 +6666,24 @@ dependencies = [ "memchr", ] +[[package]] +name = "wit-parser" +version = "0.217.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb893dcd6d370cfdf19a0d9adfcd403efb8e544e1a0ea3a8b81a21fe392eaa78" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.6.0", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + [[package]] name = "wyz" version = "0.5.1" @@ -6720,20 +6754,19 @@ checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zstd" -version = "0.11.2+zstd.1.5.2" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ - "libc", "zstd-sys", ] diff --git a/Cargo.toml b/Cargo.toml index 4dbf5367321..85e567be203 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -196,7 +196,7 @@ ron = "0.8" rusqlite = { version = "0.29.0", features = ["bundled", "column_decltype"] } rust_decimal = { version = "1.29.1", features = ["db-tokio-postgres"] } rustc-demangle = "0.1.21" -rustc-hash = "1.1.0" +rustc-hash = "2" rustyline = { version = "12.0.0", features = [] } scoped-tls = "1.0.1" scopeguard = "1.1.0" @@ -241,30 +241,42 @@ tracing-flame = "0.2.0" tracing-log = "0.1.3" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } typed-arena = "2.0" -unicode-normalization = "0.1.23" unicode-ident = "1.0.12" +unicode-normalization = "0.1.23" url = "2.3.1" urlencoding = "2.1.2" uuid = { version = "1.2.1", features = ["v4"] } walkdir = "2.2.5" wasmbin = "0.6" +# Vendor the openssl we rely on, rather than depend on a +# potentially very old system version. +openssl = { version = "0.10", features = ["vendored"] } -wasmtime = { version = "15", default-features = false, features = ["cranelift", "demangle", "addr2line", "cache"] } +[workspace.dependencies.wasmtime] +version = "25" +default-features = false +features = [ + "addr2line", + "cache", + "cranelift", + "demangle", + "parallel-compilation", + "runtime", + "std", +] +[workspace.dependencies.tracing-tracy] +version = "0.10.4" # We use the "ondemand" feature to allow connecting after the start, # and reconnecting, from the tracy client to the database. # TODO(George): Need to be able to remove "broadcast" in some build configurations. -tracing-tracy = { version = "0.10.4", features = [ - "enable", - "system-tracing", - "context-switch-tracing", - "sampling", - "code-transfer", - "broadcast", - "ondemand", - ] } - -# Vendor the openssl we rely on, rather than depend on a -# potentially very old system version. -openssl = { version = "0.10", features = ["vendored"] } +features = [ + "enable", + "system-tracing", + "context-switch-tracing", + "sampling", + "code-transfer", + "broadcast", + "ondemand", +] diff --git a/crates/core/src/host/wasm_common.rs b/crates/core/src/host/wasm_common.rs index 17504e12e2a..844f706b6d7 100644 --- a/crates/core/src/host/wasm_common.rs +++ b/crates/core/src/host/wasm_common.rs @@ -2,6 +2,7 @@ pub mod abi; pub mod instrumentation; pub mod module_host_actor; +use std::fmt; use std::num::NonZeroU16; use std::time::Instant; @@ -26,7 +27,7 @@ pub const CLIENT_CONNECTED_DUNDER: &str = "__identity_connected__"; /// The reducer with this name is invoked when a client disconnects. pub const CLIENT_DISCONNECTED_DUNDER: &str = "__identity_disconnected__"; -#[derive(Debug, Copy, Clone, PartialEq, Eq)] +#[derive(Debug, Clone)] #[allow(unused)] pub enum WasmType { I32, @@ -34,53 +35,79 @@ pub enum WasmType { F32, F64, V128, - FuncRef, - ExternRef, + #[allow(clippy::box_collection)] + Ref(Box), } -macro_rules! type_eq { - ($t:path) => { - impl PartialEq for $t { - fn eq(&self, other: &WasmType) -> bool { - matches!( - (self, other), - (Self::I32, WasmType::I32) - | (Self::I64, WasmType::I64) - | (Self::F32, WasmType::F32) - | (Self::F64, WasmType::F64) - | (Self::V128, WasmType::V128) - | (Self::FuncRef, WasmType::FuncRef) - | (Self::ExternRef, WasmType::ExternRef) - ) - } - } - impl PartialEq<&WasmType> for $t { - fn eq(&self, other: &&WasmType) -> bool { - self.eq(*other) - } - } - impl From<$t> for WasmType { - fn from(ty: $t) -> WasmType { - match ty { - <$t>::I32 => WasmType::I32, - <$t>::I64 => WasmType::I64, - <$t>::F32 => WasmType::F32, - <$t>::F64 => WasmType::F64, - <$t>::V128 => WasmType::V128, - <$t>::FuncRef => WasmType::FuncRef, - <$t>::ExternRef => WasmType::ExternRef, - } - } +impl fmt::Display for WasmType { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str(match self { + WasmType::I32 => "i32", + WasmType::I64 => "i64", + WasmType::F32 => "f32", + WasmType::F64 => "f64", + WasmType::V128 => "v128", + WasmType::Ref(r) => r, + }) + } +} + +impl PartialEq for wasmtime::ValType { + fn eq(&self, other: &WasmType) -> bool { + matches!( + (self, other), + (Self::I32, WasmType::I32) + | (Self::I64, WasmType::I64) + | (Self::F32, WasmType::F32) + | (Self::F64, WasmType::F64) + | (Self::V128, WasmType::V128) + ) + } +} +impl PartialEq<&WasmType> for wasmtime::ValType { + fn eq(&self, other: &&WasmType) -> bool { + self.eq(*other) + } +} +impl From for WasmType { + fn from(ty: wasmtime::ValType) -> WasmType { + match ty { + wasmtime::ValType::I32 => WasmType::I32, + wasmtime::ValType::I64 => WasmType::I64, + wasmtime::ValType::F32 => WasmType::F32, + wasmtime::ValType::F64 => WasmType::F64, + wasmtime::ValType::V128 => WasmType::V128, + wasmtime::ValType::Ref(ty) => WasmType::Ref(Box::new(ty.to_string())), } - }; + } } -type_eq!(wasmtime::ValType); #[derive(Debug)] pub struct FuncSig> { params: T, results: T, } +impl> fmt::Display for FuncSig { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "(func")?; + let (params, results) = (self.params.as_ref(), self.results.as_ref()); + if !params.is_empty() { + write!(f, " (param")?; + for p in params { + write!(f, " {p}")?; + } + write!(f, ")")?; + } + if !results.is_empty() { + write!(f, " (result")?; + for r in results { + write!(f, " {r}")?; + } + write!(f, ")")?; + } + write!(f, ")") + } +} type StaticFuncSig = FuncSig<&'static [WasmType]>; type BoxFuncSig = FuncSig>; impl StaticFuncSig { @@ -141,14 +168,14 @@ const CALL_REDUCER_SIG: StaticFuncSig = FuncSig::new( #[derive(thiserror::Error, Debug)] pub enum ValidationError { - #[error("bad {kind} signature for {name:?}; expected {expected:?} got {actual:?}")] + #[error("bad {kind} signature for {name:?}; expected {expected} got {actual}")] MismatchedSignature { kind: &'static str, name: Box, expected: StaticFuncSig, actual: BoxFuncSig, }, - #[error("expected {name:?} export to be a {kind} with signature {expected:?}, but it wasn't a function at all")] + #[error("expected {name:?} export to be a {kind} with signature {expected}, but it wasn't a function at all")] NotAFunction { kind: &'static str, name: Box,