diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 17a0f6af..417236b5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -75,7 +75,7 @@ jobs: uses: engineerd/configurator@v0.0.8 with: name: "spin" - url: "https://github.com/fermyon/spin/releases/download/v1.3.0/spin-v1.3.0-linux-amd64.tar.gz" + url: "https://github.com/fermyon/spin/releases/download/canary/spin-canary-linux-amd64.tar.gz" pathInArchive: "spin" - name: Run Test diff --git a/Cargo.lock b/Cargo.lock index 307e21eb..3a7f4612 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] @@ -52,11 +52,59 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +dependencies = [ + "anstyle", + "windows-sys", +] + [[package]] name = "anyhow" -version = "1.0.69" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arbitrary" @@ -66,13 +114,13 @@ checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" [[package]] name = "async-trait" -version = "0.1.64" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.31", ] [[package]] @@ -94,9 +142,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" [[package]] name = "binaryen" @@ -157,15 +205,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbe3c979c178231552ecba20214a8272df4e09f232a87aef4320cf06539aded" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] @@ -200,7 +248,7 @@ dependencies = [ "cap-primitives 1.0.15", "cap-std 1.0.15", "io-lifetimes 1.0.11", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -229,13 +277,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b6df5b295dca8d56f35560be8c391d59f0420f72e546997154e24e765e6451" dependencies = [ "ambient-authority 0.0.2", - "fs-set-times 0.19.1", + "fs-set-times 0.19.2", "io-extras 0.17.4", "io-lifetimes 1.0.11", "ipnet", "maybe-owned", - "rustix 0.37.20", - "windows-sys 0.48.0", + "rustix 0.37.23", + "windows-sys", "winx 0.35.1", ] @@ -271,7 +319,7 @@ dependencies = [ "cap-primitives 1.0.15", "io-extras 0.17.4", "io-lifetimes 1.0.11", - "rustix 0.37.20", + "rustix 0.37.23", ] [[package]] @@ -282,17 +330,18 @@ checksum = "e95002993b7baee6b66c8950470e59e5226a23b3af39fc59c47fe416dd39821a" dependencies = [ "cap-primitives 1.0.15", "once_cell", - "rustix 0.37.20", + "rustix 0.37.23", "winx 0.35.1", ] [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -312,9 +361,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clang-sys" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ed9a53e5d4d9c573ae844bfac6872b159cb1d1585a83b29e7a64b7eef7332a" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ "glob", "libc", @@ -338,50 +387,59 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.11" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42dfd32784433290c51d92c438bb72ea5063797fc3cc9a21a8c4346bebbb2098" +checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" dependencies = [ - "bitflags 2.3.2", + "clap_builder", "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +dependencies = [ + "anstream", + "anstyle", "clap_lex", - "is-terminal", - "once_cell", "strsim 0.10.0", - "termcolor", ] [[package]] name = "clap_derive" -version = "4.1.9" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fddf67631444a3a3e3e5ac51c36a5e01335302de677bd78759eaa90ab1f46644" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck 0.4.1", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.31", ] [[package]] name = "clap_lex" -version = "0.3.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033f6b7a4acb1f358c742aaca805c939ee73b4c6209ae4318ec7aca81c42e646" -dependencies = [ - "os_str_bytes", -] +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "cmake" -version = "0.1.49" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" dependencies = [ "cc", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "cpp_demangle" version = "0.3.5" @@ -393,9 +451,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -519,9 +577,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if", "crossbeam-utils", @@ -540,22 +598,22 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset", + "memoffset 0.9.0", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -581,9 +639,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", @@ -633,9 +691,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "env_logger" @@ -676,13 +734,13 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -703,22 +761,19 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "fd-lock" -version = "3.0.12" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ae6b3d9530211fb3b12a95374b8b0823be812f53d09e18c5675c0146b09642" +checksum = "0b0377f1edc77dbd1118507bc7a66e4ab64d2b90c66f90726dc801e73a8c68f9" dependencies = [ "cfg-if", - "rustix 0.37.20", - "windows-sys 0.48.0", + "rustix 0.38.11", + "windows-sys", ] [[package]] @@ -739,9 +794,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -759,13 +814,13 @@ dependencies = [ [[package]] name = "fs-set-times" -version = "0.19.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7833d0f115a013d51c55950a3b09d30e4b057be9961b709acb9b5b17a1108861" +checksum = "6d167b646a876ba8fda6b50ac645cfd96242553cbaf0ca4fccaa39afcbf0801f" dependencies = [ "io-lifetimes 1.0.11", - "rustix 0.37.20", - "windows-sys 0.48.0", + "rustix 0.38.11", + "windows-sys", ] [[package]] @@ -783,7 +838,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" dependencies = [ - "bitflags 2.3.2", + "bitflags 2.4.0", "debugid", "fxhash", "serde", @@ -792,9 +847,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -802,9 +857,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -813,9 +868,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", "indexmap", @@ -857,30 +912,24 @@ name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ - "libc", + "unicode-segmentation", ] [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hmac" @@ -891,6 +940,15 @@ dependencies = [ "digest", ] +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys", +] + [[package]] name = "http" version = "0.2.9" @@ -916,9 +974,9 @@ checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -926,24 +984,15 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", "serde", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - [[package]] name = "io-extras" version = "0.13.2" @@ -961,7 +1010,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fde93d48f0d9277f977a333eca8313695ddd5301dc96f7e02aeddcb0dd99096f" dependencies = [ "io-lifetimes 1.0.11", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -976,27 +1025,32 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.2", "libc", - "windows-sys 0.48.0", + "windows-sys", ] +[[package]] +name = "io-lifetimes" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bffb4def18c48926ccac55c1223e02865ce1a821751a95920448662696e7472c" + [[package]] name = "ipnet" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.4" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes 1.0.11", - "rustix 0.36.8", - "windows-sys 0.45.0", + "hermit-abi 0.3.2", + "rustix 0.38.11", + "windows-sys", ] [[package]] @@ -1010,15 +1064,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "ittapi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e648c437172ce7d3ac35ca11a068755072054826fa455a916b43524fa4a62a7" +checksum = "41e0d0b7b3b53d92a7e8b80ede3400112a6b8b4c98d1f5b8b16bb787c780582c" dependencies = [ "anyhow", "ittapi-sys", @@ -1027,9 +1081,9 @@ dependencies = [ [[package]] name = "ittapi-sys" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b32a4d23f72548178dde54f3c12c6b6a08598e25575c0d0fa5bd861e0dc1a5" +checksum = "f2f8763c96e54e6d6a0dccc2990d8b5e33e3313aaeae6185921a3f4c1614a77c" dependencies = [ "cc", ] @@ -1063,9 +1117,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.146" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libloading" @@ -1085,24 +1139,21 @@ checksum = "5284f00d480e1c39af34e72f8ad60b94f47007e3481cd3b731c1d67190ddc7b7" [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "mach" @@ -1121,9 +1172,9 @@ checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memfd" @@ -1131,7 +1182,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.37.20", + "rustix 0.37.23", ] [[package]] @@ -1143,6 +1194,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1161,19 +1221,19 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] [[package]] name = "object" -version = "0.30.3" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "crc32fast", "hashbrown 0.13.2", @@ -1183,21 +1243,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" - -[[package]] -name = "os_str_bytes" -version = "6.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "paste" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "peeking_take_while" @@ -1207,15 +1261,15 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pkg-config" @@ -1229,35 +1283,11 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -1307,9 +1337,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1346,9 +1376,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ "either", "rayon-core", @@ -1356,9 +1386,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -1375,6 +1405,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -1382,7 +1421,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] @@ -1401,9 +1440,21 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.1" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", @@ -1412,9 +1463,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "routefinder" @@ -1428,9 +1479,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -1456,39 +1507,38 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.8" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ "bitflags 1.3.2", - "errno 0.2.8", + "errno 0.3.3", "io-lifetimes 1.0.11", + "itoa", "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.45.0", + "linux-raw-sys 0.3.8", + "once_cell", + "windows-sys", ] [[package]] name = "rustix" -version = "0.37.20" +version = "0.38.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" +checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453" dependencies = [ - "bitflags 1.3.2", - "errno 0.3.1", - "io-lifetimes 1.0.11", - "itoa", + "bitflags 2.4.0", + "errno 0.3.3", "libc", - "linux-raw-sys 0.3.8", - "once_cell", - "windows-sys 0.48.0", + "linux-raw-sys 0.4.5", + "windows-sys", ] [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -1501,9 +1551,15 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "send_wrapper" @@ -1513,38 +1569,38 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.31", ] [[package]] name = "serde_json" -version = "1.0.93" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -1553,9 +1609,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", @@ -1573,9 +1629,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "slice-group-by" @@ -1585,9 +1641,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "smartcow" @@ -1615,7 +1671,7 @@ version = "0.6.0" dependencies = [ "anyhow", "binaryen", - "clap 4.1.11", + "clap 4.4.2", "tempfile", "wizer", ] @@ -1647,20 +1703,20 @@ dependencies = [ [[package]] name = "spin-macro" version = "0.1.0" -source = "git+https://github.com/fermyon/spin?rev=d092cf40582a707066768737f13ad0b9b8c5cff3#d092cf40582a707066768737f13ad0b9b8c5cff3" +source = "git+https://github.com/fermyon/spin?rev=4d178a11407aecca5ab062458abb8580eee3247c#4d178a11407aecca5ab062458abb8580eee3247c" dependencies = [ "anyhow", "bytes", "http", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "spin-sdk" -version = "1.4.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=d092cf40582a707066768737f13ad0b9b8c5cff3#d092cf40582a707066768737f13ad0b9b8c5cff3" +version = "1.5.0-pre0" +source = "git+https://github.com/fermyon/spin?rev=4d178a11407aecca5ab062458abb8580eee3247c#4d178a11407aecca5ab062458abb8580eee3247c" dependencies = [ "anyhow", "bytes", @@ -1669,7 +1725,7 @@ dependencies = [ "routefinder", "spin-macro", "thiserror", - "wit-bindgen-rust 0.2.0", + "wit-bindgen", ] [[package]] @@ -1698,9 +1754,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" @@ -1713,39 +1769,50 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "system-interface" -version = "0.25.7" +version = "0.25.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928ebd55ab758962e230f51ca63735c5b283f26292297c81404289cda5d78631" +checksum = "10081a99cbecbc363d381b9503563785f0b02735fccbb0d4c1a2cb3d39f7e7fe" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cap-fs-ext", "cap-std 1.0.15", "fd-lock", - "io-lifetimes 1.0.11", - "rustix 0.37.20", - "windows-sys 0.48.0", - "winx 0.35.1", + "io-lifetimes 2.0.2", + "rustix 0.38.11", + "windows-sys", + "winx 0.36.2", ] [[package]] name = "target-lexicon" -version = "0.12.6" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tempfile" -version = "3.4.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", - "rustix 0.36.8", - "windows-sys 0.42.0", + "redox_syscall 0.3.5", + "rustix 0.38.11", + "windows-sys", ] [[package]] @@ -1768,22 +1835,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.31", ] [[package]] @@ -1825,20 +1892,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.31", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", ] @@ -1851,9 +1918,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] @@ -1866,9 +1933,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -1899,20 +1966,26 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "url" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" -version = "1.3.4" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa2982af2eec27de306107c027578ff7f423d65f7250e40ce0fea8f45248b81" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" [[package]] name = "vec_map" @@ -1928,12 +2001,11 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -1955,16 +2027,16 @@ dependencies = [ "cap-rand", "cap-std 1.0.15", "cap-time-ext", - "fs-set-times 0.19.1", + "fs-set-times 0.19.2", "io-extras 0.17.4", "io-lifetimes 1.0.11", "is-terminal", "once_cell", - "rustix 0.37.20", + "rustix 0.37.23", "system-interface", "tracing", "wasi-common", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -1979,12 +2051,12 @@ dependencies = [ "cap-std 1.0.15", "io-extras 0.17.4", "log", - "rustix 0.37.20", + "rustix 0.37.23", "thiserror", "tracing", "wasmtime", "wiggle", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -2005,6 +2077,28 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" +dependencies = [ + "leb128", +] + +[[package]] +name = "wasm-metadata" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36e5156581ff4a302405c44ca7c85347563ca431d15f1a773f12c9c7b9a6cdc9" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "wasm-encoder 0.29.0", + "wasmparser 0.107.0", +] + [[package]] name = "wasmparser" version = "0.103.0" @@ -2025,6 +2119,16 @@ dependencies = [ "url", ] +[[package]] +name = "wasmparser" +version = "0.107.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +dependencies = [ + "indexmap", + "semver", +] + [[package]] name = "wasmtime" version = "9.0.4" @@ -2057,7 +2161,7 @@ dependencies = [ "wasmtime-jit", "wasmtime-runtime", "wat", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -2081,11 +2185,11 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.37.20", + "rustix 0.37.23", "serde", "sha2", "toml", - "windows-sys 0.48.0", + "windows-sys", "zstd", ] @@ -2098,7 +2202,7 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasmtime-component-util", "wasmtime-wit-bindgen", "wit-parser 0.7.1", @@ -2176,9 +2280,9 @@ checksum = "23c5127908fdf720614891ec741c13dd70c844e102caa393e2faca1ee68e9bfb" dependencies = [ "cc", "cfg-if", - "rustix 0.37.20", + "rustix 0.37.23", "wasmtime-asm-macros", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -2203,7 +2307,7 @@ dependencies = [ "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -2214,7 +2318,7 @@ checksum = "65fb78eacf4a6e47260d8ef8cc81ea8ddb91397b2e848b3fb01567adebfe89b5" dependencies = [ "object", "once_cell", - "rustix 0.37.20", + "rustix 0.37.23", ] [[package]] @@ -2225,7 +2329,7 @@ checksum = "d1364900b05f7d6008516121e8e62767ddb3e176bdf4c84dfa85da1734aeab79" dependencies = [ "cfg-if", "libc", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -2242,15 +2346,15 @@ dependencies = [ "log", "mach", "memfd", - "memoffset", + "memoffset 0.8.0", "paste", "rand", - "rustix 0.37.20", + "rustix 0.37.23", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-fiber", "wasmtime-jit-debug", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -2301,34 +2405,35 @@ dependencies = [ [[package]] name = "wast" -version = "60.0.0" +version = "64.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd06cc744b536e30387e72a48fdd492105b9c938bb4f415c39c616a7a0a697ad" +checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" dependencies = [ "leb128", "memchr", "unicode-width", - "wasm-encoder 0.29.0", + "wasm-encoder 0.32.0", ] [[package]] name = "wat" -version = "1.0.66" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5abe520f0ab205366e9ac7d3e6b2fc71de44e32a2b58f2ec871b6b575bdcea3b" +checksum = "53253d920ab413fca1c7dc2161d601c79b4fdf631d0ba51dd4343bf9b556c3f6" dependencies = [ - "wast 60.0.0", + "wast 64.0.0", ] [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix 0.38.11", ] [[package]] @@ -2357,7 +2462,7 @@ dependencies = [ "proc-macro2", "quote", "shellexpand", - "syn", + "syn 1.0.109", "witx", ] @@ -2369,7 +2474,7 @@ checksum = "6ca1a344a0ba781e2a94b27be5bb78f23e43d52336bd663b810d49d7189ad334" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wiggle-generate", ] @@ -2404,152 +2509,71 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.1", -] - [[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.0", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", -] - -[[package]] -name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winx" @@ -2570,63 +2594,66 @@ checksum = "1c52a121f0fbf9320d5f2a9a5d82f6cb7557eda5e8b47fc3e7f359ec866ae960" dependencies = [ "bitflags 1.3.2", "io-lifetimes 1.0.11", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] -name = "wit-bindgen-gen-core" -version = "0.1.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=dde4694aaa6acf9370206527a798ac4ba6a8c5b8#dde4694aaa6acf9370206527a798ac4ba6a8c5b8" +name = "winx" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357bb8e2932df531f83b052264b050b81ba0df90ee5a59b2d1d3949f344f81e5" dependencies = [ - "anyhow", - "wit-parser 0.1.0", + "bitflags 2.4.0", + "windows-sys", ] [[package]] -name = "wit-bindgen-gen-core" -version = "0.2.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=cb871cfa1ee460b51eb1d144b175b9aab9c50aba#cb871cfa1ee460b51eb1d144b175b9aab9c50aba" +name = "wit-bindgen" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "392d16e9e46cc7ca98125bc288dd5e4db469efe8323d3e0dac815ca7f2398522" dependencies = [ - "anyhow", - "wit-parser 0.2.0", + "bitflags 2.4.0", + "wit-bindgen-rust-macro", ] [[package]] -name = "wit-bindgen-gen-rust" -version = "0.1.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=dde4694aaa6acf9370206527a798ac4ba6a8c5b8#dde4694aaa6acf9370206527a798ac4ba6a8c5b8" +name = "wit-bindgen-core" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d422d36cbd78caa0e18c3371628447807c66ee72466b69865ea7e33682598158" dependencies = [ - "heck 0.3.3", - "wit-bindgen-gen-core 0.1.0", + "anyhow", + "wit-component", + "wit-parser 0.8.0", ] [[package]] -name = "wit-bindgen-gen-rust" -version = "0.2.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=cb871cfa1ee460b51eb1d144b175b9aab9c50aba#cb871cfa1ee460b51eb1d144b175b9aab9c50aba" +name = "wit-bindgen-gen-core" +version = "0.1.0" +source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=dde4694aaa6acf9370206527a798ac4ba6a8c5b8#dde4694aaa6acf9370206527a798ac4ba6a8c5b8" dependencies = [ - "heck 0.3.3", - "wit-bindgen-gen-core 0.2.0", + "anyhow", + "wit-parser 0.1.0", ] [[package]] -name = "wit-bindgen-gen-rust-wasm" +name = "wit-bindgen-gen-rust" version = "0.1.0" source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=dde4694aaa6acf9370206527a798ac4ba6a8c5b8#dde4694aaa6acf9370206527a798ac4ba6a8c5b8" dependencies = [ "heck 0.3.3", - "wit-bindgen-gen-core 0.1.0", - "wit-bindgen-gen-rust 0.1.0", + "wit-bindgen-gen-core", ] [[package]] name = "wit-bindgen-gen-rust-wasm" -version = "0.2.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=cb871cfa1ee460b51eb1d144b175b9aab9c50aba#cb871cfa1ee460b51eb1d144b175b9aab9c50aba" +version = "0.1.0" +source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=dde4694aaa6acf9370206527a798ac4ba6a8c5b8#dde4694aaa6acf9370206527a798ac4ba6a8c5b8" dependencies = [ "heck 0.3.3", - "wit-bindgen-gen-core 0.2.0", - "wit-bindgen-gen-rust 0.2.0", + "wit-bindgen-gen-core", + "wit-bindgen-gen-rust", ] [[package]] @@ -2636,17 +2663,20 @@ source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=dde4694aaa6acf dependencies = [ "async-trait", "bitflags 1.3.2", - "wit-bindgen-rust-impl 0.1.0", + "wit-bindgen-rust-impl", ] [[package]] name = "wit-bindgen-rust" -version = "0.2.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=cb871cfa1ee460b51eb1d144b175b9aab9c50aba#cb871cfa1ee460b51eb1d144b175b9aab9c50aba" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b76db68264f5d2089dc4652581236d8e75c5b89338de6187716215fd0e68ba3" dependencies = [ - "async-trait", - "bitflags 1.3.2", - "wit-bindgen-rust-impl 0.2.0", + "heck 0.4.1", + "wasm-metadata", + "wit-bindgen-core", + "wit-bindgen-rust-lib", + "wit-component", ] [[package]] @@ -2655,20 +2685,49 @@ version = "0.1.0" source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=dde4694aaa6acf9370206527a798ac4ba6a8c5b8#dde4694aaa6acf9370206527a798ac4ba6a8c5b8" dependencies = [ "proc-macro2", - "syn", - "wit-bindgen-gen-core 0.1.0", - "wit-bindgen-gen-rust-wasm 0.1.0", + "syn 1.0.109", + "wit-bindgen-gen-core", + "wit-bindgen-gen-rust-wasm", ] [[package]] -name = "wit-bindgen-rust-impl" -version = "0.2.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=cb871cfa1ee460b51eb1d144b175b9aab9c50aba#cb871cfa1ee460b51eb1d144b175b9aab9c50aba" +name = "wit-bindgen-rust-lib" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c50f334bc08b0903a43387f6eea6ef6aa9eb2a085729f1677b29992ecef20ba" dependencies = [ + "heck 0.4.1", + "wit-bindgen-core", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced38a5e174940c6a41ae587babeadfd2e2c2dc32f3b6488bcdca0e8922cf3f3" +dependencies = [ + "anyhow", "proc-macro2", - "syn", - "wit-bindgen-gen-core 0.2.0", - "wit-bindgen-gen-rust-wasm 0.2.0", + "syn 2.0.31", + "wit-bindgen-core", + "wit-bindgen-rust 0.8.0", + "wit-component", +] + +[[package]] +name = "wit-component" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cbd4c7f8f400327c482c88571f373844b7889e61460650d650fc5881bb3575c" +dependencies = [ + "anyhow", + "bitflags 1.3.2", + "indexmap", + "log", + "wasm-encoder 0.29.0", + "wasm-metadata", + "wasmparser 0.107.0", + "wit-parser 0.8.0", ] [[package]] @@ -2685,27 +2744,31 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.2.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=cb871cfa1ee460b51eb1d144b175b9aab9c50aba#cb871cfa1ee460b51eb1d144b175b9aab9c50aba" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca2581061573ef6d1754983d7a9b3ed5871ef859d52708ea9a0f5af32919172" dependencies = [ "anyhow", "id-arena", + "indexmap", + "log", "pulldown-cmark", - "unicode-normalization", "unicode-xid", + "url", ] [[package]] name = "wit-parser" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca2581061573ef6d1754983d7a9b3ed5871ef859d52708ea9a0f5af32919172" +checksum = "6daec9f093dbaea0e94043eeb92ece327bbbe70c86b1f41aca9bbfefd7f050f0" dependencies = [ "anyhow", "id-arena", "indexmap", "log", "pulldown-cmark", + "semver", "unicode-xid", "url", ] diff --git a/crates/spin-js-engine/Cargo.toml b/crates/spin-js-engine/Cargo.toml index b4d59433..85a57621 100644 --- a/crates/spin-js-engine/Cargo.toml +++ b/crates/spin-js-engine/Cargo.toml @@ -4,10 +4,10 @@ version = "0.6.0" edition = "2021" [lib] -crate-type = [ "cdylib" ] +crate-type = ["cdylib"] [dependencies] -anyhow = "1" +anyhow = "1.0.70" bytes = { version = "1.2.1", features = ["serde"] } glob = "0.3.0" hmac = "0.12.1" @@ -16,7 +16,9 @@ quickjs-wasm-rs = "0.1.4" quickjs-wasm-sys = "0.1.2" once_cell = "1.4.0" serde_json = "1.0.87" -spin-sdk = { git = "https://github.com/fermyon/spin", rev = "d092cf40582a707066768737f13ad0b9b8c5cff3", default-features = false, features=["experimental"] } +spin-sdk = { git = "https://github.com/fermyon/spin", rev = "4d178a11407aecca5ab062458abb8580eee3247c", default-features = false, features = [ + "experimental", +] } wit-bindgen-rust = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "dde4694aaa6acf9370206527a798ac4ba6a8c5b8" } rand = "0.8.5" serde = "1.0.137" diff --git a/crates/spin-js-engine/src/lib.rs b/crates/spin-js-engine/src/lib.rs index a112e88c..1a882e1d 100644 --- a/crates/spin-js-engine/src/lib.rs +++ b/crates/spin-js-engine/src/lib.rs @@ -1,5 +1,4 @@ #![deny(warnings)] - use { anyhow::{anyhow, bail, Result}, hmac::{Hmac, Mac}, @@ -16,7 +15,7 @@ use { http::{Request, Response}, http_component, key_value, key_value::Store, - mysql, outbound_http, pg, + llm, mysql, outbound_http, pg, redis::{self, RedisResult}, sqlite, }, @@ -1045,6 +1044,132 @@ fn postgres_query(context: &Context, _this: &Value, args: &[Value]) -> Result llm::InferencingModel { + match name { + "llama2-chat" => llm::InferencingModel::Llama2Chat, + "codellama-instruct" => llm::InferencingModel::CodellamaInstruct, + _ => llm::InferencingModel::Other(name), + } +} + +fn llm_run_with_defaults(context: &Context, _this: &Value, args: &[Value]) -> Result { + match args { + [model, prompt] => { + let model = deserialize_helper(model)?; + let prompt = deserialize_helper(prompt)?; + let llm_model = map_inferencing_model_name(model.as_str()); + let inference_result = llm::infer(llm_model, &prompt); + match inference_result { + Ok(val) => { + let ret = context.object_value()?; + ret.set_property("text", context.value_from_str(&val.text)?)?; + let usage = context.object_value()?; + usage.set_property( + "promptTokenCount", + context.value_from_u32(val.usage.prompt_token_count)?, + )?; + usage.set_property( + "generatedTokenCount", + context.value_from_u32(val.usage.generated_token_count)?, + )?; + ret.set_property("usage", usage)?; + Ok(ret) + } + Err(err) => Err(anyhow!(err)), + } + } + _ => Err(anyhow!("expected 2 arguments, got {}", args.len())), + } +} + +#[derive(Serialize, Deserialize, Debug)] +struct InferencingOption { + max_tokens: u32, + repeat_penalty: f32, + repeat_penalty_last_n_token_count: u32, + temperature: f32, + top_k: u32, + top_p: f32, +} + +fn llm_inference_with_options(context: &Context, _this: &Value, args: &[Value]) -> Result { + match args { + [model, prompt, options] => { + let model = deserialize_helper(model)?; + let prompt = deserialize_helper(prompt)?; + let llm_model = map_inferencing_model_name(model.as_str()); + let options_deserializer = &mut Deserializer::from(options.clone()); + let options = InferencingOption::deserialize(options_deserializer)?; + let llm_options = llm::InferencingParams { + max_tokens: options.max_tokens, + repeat_penalty: options.repeat_penalty, + repeat_penalty_last_n_token_count: options.repeat_penalty_last_n_token_count, + temperature: options.temperature, + top_k: options.top_k, + top_p: options.top_p, + }; + let inference_result = llm::infer_with_options(llm_model, &prompt, llm_options); + match inference_result { + Ok(val) => { + let ret = context.object_value()?; + ret.set_property("text", context.value_from_str(&val.text)?)?; + let usage = context.object_value()?; + usage.set_property( + "promptTokenCount", + context.value_from_u32(val.usage.prompt_token_count)?, + )?; + usage.set_property( + "generatedTokenCount", + context.value_from_u32(val.usage.generated_token_count)?, + )?; + ret.set_property("usage", usage)?; + Ok(ret) + } + Err(err) => Err(anyhow!(err)), + } + } + _ => Err(anyhow!("expected 2 argument, got {}", args.len())), + } +} + +fn map_embedding_model_name(name: &str) -> llm::EmbeddingModel { + match name { + "all-minilm-l6-v2" => llm::EmbeddingModel::AllMiniLmL6V2, + _ => llm::EmbeddingModel::Other(name), + } +} + +fn llm_embedding_with_defaults(context: &Context, _this: &Value, args: &[Value]) -> Result { + match args { + [model, sentences] => { + let model = deserialize_helper(model)?; + let embedding_model = map_embedding_model_name(model.as_str()); + let deserializer = &mut Deserializer::from(sentences.clone()); + let sentences = Vec::::deserialize(deserializer)?; + let vec_str: Vec<&str> = sentences.iter().map(|s| s.as_str()).collect(); + let result = llm::generate_embeddings(embedding_model, &vec_str); + match result { + Ok(val) => { + let mut serializer = Serializer::from_context(context)?; + val.embeddings.serialize(&mut serializer)?; + + let result = context.object_value()?; + result.set_property("embeddings", serializer.value)?; + let usage = context.object_value()?; + usage.set_property( + "promptTokenCount", + context.value_from_u32(val.usage.prompt_token_count)?, + )?; + result.set_property("usage", usage)?; + Ok(result) + } + Err(err) => Err(anyhow!(err)), + } + } + _ => Err(anyhow!("expected 1 argument, got {}", args.len())), + } +} + fn do_init() -> Result<()> { let mut script = String::new(); io::stdin().read_to_string(&mut script)?; @@ -1092,6 +1217,18 @@ fn do_init() -> Result<()> { sqlite.set_property("open", context.wrap_callback(open_sqlite)?)?; sqlite.set_property("openDefault", context.wrap_callback(open_sqlite)?)?; + // LLM object + let llm = context.object_value()?; + llm.set_property("infer", context.wrap_callback(llm_run_with_defaults)?)?; + llm.set_property( + "inferWithOptions", + context.wrap_callback(llm_inference_with_options)?, + )?; + llm.set_property( + "generateEmbeddings", + context.wrap_callback(llm_embedding_with_defaults)?, + )?; + let spin_sdk = context.object_value()?; spin_sdk.set_property("config", config)?; spin_sdk.set_property("http", http)?; @@ -1100,6 +1237,7 @@ fn do_init() -> Result<()> { spin_sdk.set_property("pg", postgres)?; spin_sdk.set_property("kv", kv)?; spin_sdk.set_property("sqlite", sqlite)?; + spin_sdk.set_property("llm", llm)?; let _glob = context.object_value()?; _glob.set_property("get", context.wrap_callback(get_glob)?)?; diff --git a/spin-sdk/src/index.ts b/spin-sdk/src/index.ts index cfeee9db..f94731f0 100644 --- a/spin-sdk/src/index.ts +++ b/spin-sdk/src/index.ts @@ -1,12 +1,12 @@ import { HandleRequest, Handler, HttpRequest, HttpResponse } from "./modules/handlerFunction"; -import { Config, Kv, Mysql, Pg, Redis, spinSdk, SpinSdk, Sqlite } from "./modules/spinSdk"; +import { Config, Kv, Llm, Mysql, Pg, Redis, spinSdk, SpinSdk, Sqlite, InferencingModels, EmbeddingModels, InferencingOptions, ResponseBuilder } from "./modules/spinSdk"; import "./modules/globalDefinitions" import { router as Router, routerType } from "./modules/router"; export { Router, routerType } -export { Config, Redis, Kv, Mysql, Pg, Sqlite } +export { Config, Redis, Kv, Mysql, Pg, Sqlite, Llm, InferencingModels, EmbeddingModels, InferencingOptions, ResponseBuilder } export {spinSdk, SpinSdk} export { HandleRequest, Handler, HttpRequest, HttpResponse} \ No newline at end of file diff --git a/spin-sdk/src/modules/spinSdk.ts b/spin-sdk/src/modules/spinSdk.ts index 0372b172..a585cf28 100644 --- a/spin-sdk/src/modules/spinSdk.ts +++ b/spin-sdk/src/modules/spinSdk.ts @@ -38,6 +38,42 @@ interface RdbmsReturn { ] } +interface InferencingOptions { + maxTokens?: number, + repeatPenalty?: number, + repeatPenaltyLastNTokenCount?: number, + temperature?: number, + topK?: number, + topP?: number +} + +interface InternalInferencingOptions { + max_tokens?: number, + repeat_penalty?: number, + repeat_penalty_last_n_token_count?: number, + temperature?: number, + top_k?: number, + top_p?: number +} + +interface InferenceUsage { + promptTokenCount: number, + generatedTokenCount: number +} +interface InferenceResult { + text: string + usage: InferenceUsage +} + +interface EmbeddingUsage { + promptTokenCount: number +} + +interface EmbeddingResult { + embeddings: Array> + usage: EmbeddingUsage +} + /** @deprecated*/ interface SpinSdk { utils: { @@ -83,8 +119,56 @@ interface SpinSdk { open: (name: string) => SqliteStore openDefault: () => SqliteStore } + llm: { + infer: (model: InferencingModels | string, prompt: string) => InferenceResult + inferWithOptions: (model: InferencingModels | string, prompt: string, options: InternalInferencingOptions) => InferenceResult + generateEmbeddings: (model: EmbeddingModels | string, sentences: Array) => EmbeddingResult + } +} + +interface HttpResponse { + status: number + headers?: Record + body?: ArrayBuffer | string | Uint8Array +} + +function encodeBody(body: ArrayBuffer | Uint8Array | string) { + if (typeof (body) == "string") { + return new TextEncoder().encode(body).buffer + } else if (ArrayBuffer.isView(body)) { + return body.buffer + } else { + return body + } } +class ResponseBuilder { + response: HttpResponse + statusCode: number + constructor() { + this.response = { + status: 200, + headers: {} + } + this.statusCode = this.response.status + } + getHeader(key: string) { + return this.response.headers![key] || null + } + header(key: string, value: string) { + this.response.headers![key] = value + return this + } + status(status: number) { + this.response.status! = status + this.statusCode = this.response.status + return this + } + body(data: ArrayBuffer | Uint8Array | string) { + this.response.body = encodeBody(data) + return this + } +} declare global { const __internal__: { @@ -120,18 +204,49 @@ const spinSdk: SpinSdk = { mysql: __internal__.spin_sdk.mysql, pg: __internal__.spin_sdk.pg, sqlite: __internal__.spin_sdk.sqlite, + llm: __internal__.spin_sdk.llm, utils: utils, Router: () => { return router() } } +enum InferencingModels { + Llama2Chat = "llama2-chat", + CodellamaInstruct = "codellama-instruct" +} + +enum EmbeddingModels { + AllMiniLmL6V2 = "all-minilm-l6-v2" +} + +const Llm = { + infer: (model: InferencingModels | string, prompt: string, options?: InferencingOptions): InferenceResult => { + if (!options) { + return __internal__.spin_sdk.llm.infer(model, prompt) + } + let inference_options: InternalInferencingOptions = { + max_tokens: options.maxTokens || 100, + repeat_penalty: options.repeatPenalty || 1.1, + repeat_penalty_last_n_token_count: options.repeatPenaltyLastNTokenCount || 64, + temperature: options.temperature || 0.8, + top_k: options.topK || 40, + top_p: options.topP || 0.9 + } + return __internal__.spin_sdk.llm.inferWithOptions(model, prompt, inference_options) + }, + generateEmbeddings: (model: EmbeddingModels | string, text: Array): EmbeddingResult => { + return __internal__.spin_sdk.llm.generateEmbeddings(model, text) + } +} + const Config = __internal__.spin_sdk.config const Redis = __internal__.spin_sdk.redis const Kv = kv const Mysql = __internal__.spin_sdk.mysql const Pg = __internal__.spin_sdk.pg const Sqlite = __internal__.spin_sdk.sqlite +// const Llm = __internal__.spin_sdk.llm export { spinSdk, SpinSdk } -export { Config, Redis, Kv, router, Mysql, Pg, Sqlite } +export { Config, Redis, Kv, router, Mysql, Pg, Sqlite, Llm, InferencingModels, EmbeddingModels, InferencingOptions, ResponseBuilder}