diff --git a/Cargo.lock b/Cargo.lock index a3dd89d..a143bcf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,22 +2,13 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "addr2line" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" -dependencies = [ - "gimli 0.27.3", -] - [[package]] name = "addr2line" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.28.0", + "gimli", ] [[package]] @@ -76,9 +67,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2135563fb5c609d2b2b87c1e8ce7bc41b0b45430fa9661f457981503dd5bf0" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] @@ -116,54 +107,6 @@ dependencies = [ "libc", ] -[[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.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" - -[[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 0.48.0", -] - -[[package]] -name = "anstyle-wincon" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" -dependencies = [ - "anstyle", - "windows-sys 0.48.0", -] - [[package]] name = "anyhow" version = "1.0.75" @@ -303,7 +246,7 @@ dependencies = [ "log", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "time", "url", @@ -316,12 +259,12 @@ version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.21.0", + "addr2line", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.32.1", + "object", "rustc-demangle", ] @@ -419,7 +362,7 @@ dependencies = [ "serde", "serde_cbor", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "sled", "tempfile", "thiserror", @@ -547,13 +490,13 @@ dependencies = [ "flate2", "fs2", "glob", - "indicatif 0.16.2", + "indicatif", "log", "rand 0.8.5", "reqwest", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "tar", "tempfile", "thiserror", @@ -561,191 +504,51 @@ dependencies = [ ] [[package]] -name = "candle-core" -version = "0.1.0" -source = "git+https://github.com/huggingface/candle?rev=b80348d22f8f0dadb6cc4101bde031d5de69a9a5#b80348d22f8f0dadb6cc4101bde031d5de69a9a5" -dependencies = [ - "byteorder", - "candle-gemm", - "half 2.3.1", - "memmap2 0.7.1", - "num-traits", - "num_cpus", - "rand 0.8.5", - "safetensors", - "thiserror", - "zip", -] - -[[package]] -name = "candle-gemm" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b726a1f6cdd7ff080e95e3d91694701b1e04a58acd198e4a78c39428b2274e" -dependencies = [ - "candle-gemm-c32", - "candle-gemm-c64", - "candle-gemm-common", - "candle-gemm-f16", - "candle-gemm-f32", - "candle-gemm-f64", - "dyn-stack", - "lazy_static", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "rayon", - "seq-macro", -] - -[[package]] -name = "candle-gemm-c32" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "661470663389f0c99fd8449e620bfae630a662739f830a323eda4dcf80888843" -dependencies = [ - "candle-gemm-common", - "dyn-stack", - "lazy_static", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "rayon", - "seq-macro", -] - -[[package]] -name = "candle-gemm-c64" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a111ddf61db562854a6d2ff4dfe1e8a84066431b7bc68d3afae4bf60874fda0" -dependencies = [ - "candle-gemm-common", - "dyn-stack", - "lazy_static", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "rayon", - "seq-macro", -] - -[[package]] -name = "candle-gemm-common" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6dd93783ead7eeef14361667ea32014dc6f716a2fc956b075fe78729e10dd5" -dependencies = [ - "dyn-stack", - "lazy_static", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "rayon", - "seq-macro", -] - -[[package]] -name = "candle-gemm-f16" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b76499bf4b858cacc526c5c8f948bc7152774247dce8568f174b743ab1363fa4" -dependencies = [ - "candle-gemm-common", - "candle-gemm-f32", - "dyn-stack", - "half 2.3.1", - "lazy_static", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "rayon", - "seq-macro", -] - -[[package]] -name = "candle-gemm-f32" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bec152e7d36339d3785e0d746d75ee94a4e92968fbb12ddcc91b536b938d016" -dependencies = [ - "candle-gemm-common", - "dyn-stack", - "lazy_static", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "rayon", - "seq-macro", -] - -[[package]] -name = "candle-gemm-f64" -version = "0.15.6" +name = "cap-fs-ext" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f59ac68a5521e2ff71431bb7f1b22126ff0b60c5e66599b1f4676433da6e69" -dependencies = [ - "candle-gemm-common", - "dyn-stack", - "lazy_static", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "rayon", - "seq-macro", -] - -[[package]] -name = "candle-nn" -version = "0.1.0" -source = "git+https://github.com/huggingface/candle?rev=b80348d22f8f0dadb6cc4101bde031d5de69a9a5#b80348d22f8f0dadb6cc4101bde031d5de69a9a5" +checksum = "b779b2d0a001c125b4584ad586268fb4b92d957bff8d26d7fe0dd78283faa814" dependencies = [ - "candle-core", - "safetensors", - "thiserror", + "cap-primitives", + "cap-std", + "io-lifetimes 2.0.2", + "windows-sys 0.48.0", ] [[package]] -name = "cap-fs-ext" -version = "1.0.15" +name = "cap-net-ext" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc48200a1a0fa6fba138b1802ad7def18ec1cdd92f7b2a04e21f1bd887f7b9" +checksum = "6ffc30dee200c20b4dcb80572226f42658e1d9c4b668656d7cc59c33d50e396e" dependencies = [ "cap-primitives", "cap-std", - "io-lifetimes 1.0.11", - "windows-sys 0.48.0", + "rustix 0.38.15", + "smallvec", ] [[package]] name = "cap-primitives" -version = "1.0.15" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b6df5b295dca8d56f35560be8c391d59f0420f72e546997154e24e765e6451" +checksum = "2bf30c373a3bee22c292b1b6a7a26736a38376840f1af3d2d806455edf8c3899" dependencies = [ "ambient-authority", "fs-set-times", "io-extras", - "io-lifetimes 1.0.11", + "io-lifetimes 2.0.2", "ipnet", "maybe-owned", - "rustix 0.37.23", + "rustix 0.38.15", "windows-sys 0.48.0", - "winx 0.35.1", + "winx", ] [[package]] name = "cap-rand" -version = "1.0.15" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d25555efacb0b5244cf1d35833d55d21abc916fff0eaad254b8e2453ea9b8ab" +checksum = "577de6cff7c2a47d6b13efe5dd28bf116bd7f8f7db164ea95b7cc2640711f522" dependencies = [ "ambient-authority", "rand 0.8.5", @@ -753,26 +556,26 @@ dependencies = [ [[package]] name = "cap-std" -version = "1.0.15" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3373a62accd150b4fcba056d4c5f3b552127f0ec86d3c8c102d60b978174a012" +checksum = "84bade423fa6403efeebeafe568fdb230e8c590a275fba2ba978dd112efcf6e9" dependencies = [ "cap-primitives", "io-extras", - "io-lifetimes 1.0.11", - "rustix 0.37.23", + "io-lifetimes 2.0.2", + "rustix 0.38.15", ] [[package]] name = "cap-time-ext" -version = "1.0.15" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e95002993b7baee6b66c8950470e59e5226a23b3af39fc59c47fe416dd39821a" +checksum = "f8f52b3c8f4abfe3252fd0a071f3004aaa3b18936ec97bdbd8763ce03aff6247" dependencies = [ "cap-primitives", "once_cell", - "rustix 0.37.23", - "winx 0.35.1", + "rustix 0.38.15", + "winx", ] [[package]] @@ -853,8 +656,8 @@ checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "atty", "bitflags 1.3.2", - "clap_derive 3.2.25", - "clap_lex 0.2.4", + "clap_derive", + "clap_lex", "indexmap 1.9.3", "once_cell", "strsim", @@ -862,28 +665,6 @@ dependencies = [ "textwrap", ] -[[package]] -name = "clap" -version = "4.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" -dependencies = [ - "clap_builder", - "clap_derive 4.4.2", -] - -[[package]] -name = "clap_builder" -version = "4.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" -dependencies = [ - "anstream", - "anstyle", - "clap_lex 0.5.1", - "strsim", -] - [[package]] name = "clap_derive" version = "3.2.25" @@ -897,18 +678,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "clap_derive" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 2.0.37", -] - [[package]] name = "clap_lex" version = "0.2.4" @@ -918,12 +687,6 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "clap_lex" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" - [[package]] name = "cloud" version = "0.2.0" @@ -936,7 +699,7 @@ dependencies = [ "serde", "serde_json", "tokio", - "tokio-util 0.7.8", + "tokio-util 0.7.9", "tracing", "uuid", ] @@ -961,7 +724,7 @@ version = "0.2.0" dependencies = [ "anyhow", "chrono", - "clap 3.2.25", + "clap", "cloud", "cloud-openapi", "comfy-table", @@ -977,12 +740,14 @@ dependencies = [ "semver", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", + "spin-app", "spin-common", "spin-http", "spin-loader", "spin-manifest", "spin-oci", + "spin-trigger", "spin-trigger-http", "tempfile", "terminal", @@ -1002,12 +767,6 @@ dependencies = [ "cc", ] -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - [[package]] name = "combine" version = "4.6.6" @@ -1019,7 +778,7 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "tokio-util 0.7.8", + "tokio-util 0.7.9", ] [[package]] @@ -1036,9 +795,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -1098,18 +857,18 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.97.2" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aae6f552c4c0ccfb30b9559b77bc985a387d998e1736cbbe6b14c903f3656cf" +checksum = "03b9d1a9e776c27ad55d7792a380785d1fe8c2d7b099eed8dbd8f4af2b598192" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.97.2" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95551de96900cefae691ce895ff2abc691ae3a0b97911a76b45faf99e432937b" +checksum = "5528483314c2dd5da438576cd8a9d0b3cedad66fb8a4727f90cd319a81950038" dependencies = [ "bumpalo", "cranelift-bforest", @@ -1118,8 +877,8 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli 0.27.3", - "hashbrown 0.13.2", + "gimli", + "hashbrown 0.14.1", "log", "regalloc2", "smallvec", @@ -1128,42 +887,43 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.97.2" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a3ad7b2bb03de3383f258b00ca29d80234bebd5130cb6ef3bae37ada5baab0" +checksum = "0f46a8318163f7682e35b8730ba93c1b586a2da8ce12a0ed545efc1218550f70" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.97.2" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915918fee4142c85fb04bafe0bcd697e2fd6c15a260301ea6f8d2ea332a30e86" +checksum = "37d1239cfd50eecfaed468d46943f8650e32969591868ad50111613704da6c70" [[package]] name = "cranelift-control" -version = "0.97.2" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e447d548cd7f4fcb87fbd10edbd66a4f77966d17785ed50a08c8f3835483c8" +checksum = "bcc530560c8f16cc1d4dd7ea000c56f519c60d1a914977abe849ce555c35a61d" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.97.2" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d8ab3352a1e5966968d7ab424bd3de8e6b58314760745c3817c2eec3fa2f918" +checksum = "f333fa641a9ad2bff0b107767dcb972c18c2bfab7969805a1d7e42449ccb0408" dependencies = [ "serde", + "serde_derive", ] [[package]] name = "cranelift-frontend" -version = "0.97.2" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bffa38431f7554aa1594f122263b87c9e04abc55c9f42b81d37342ac44f79f0" +checksum = "06abf6563015a80f03f8bc4df307d0a81363f4eb73108df3a34f6e66fb6d5307" dependencies = [ "cranelift-codegen", "log", @@ -1173,15 +933,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.97.2" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84cef66a71c77938148b72bf006892c89d6be9274a08f7e669ff15a56145d701" +checksum = "0eb29d0edc8a5c029ed0f7ca77501f272738e3c410020b4a00f42ffe8ad2a8aa" [[package]] name = "cranelift-native" -version = "0.97.2" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f33c7e5eb446e162d2d10b17fe68e1f091020cc2e4e38b5501c21099600b0a1b" +checksum = "006056a7fa920870bad06bf8e1b3033d70cbb7ee625b035efa9d90882a931868" dependencies = [ "cranelift-codegen", "libc", @@ -1190,9 +950,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.97.2" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f7b64fa6a8c5b980eb6a17ef22089e15cb9f779f1ed3bd3072beab0686c09" +checksum = "7b3d08c05f82903a1f6a04d89c4b9ecb47a4035710f89a39a21a147a80214672" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1200,7 +960,7 @@ dependencies = [ "itertools 0.10.5", "log", "smallvec", - "wasmparser 0.107.0", + "wasmparser 0.112.0", "wasmtime-types", ] @@ -1257,7 +1017,7 @@ dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.9.0", + "memoffset", "scopeguard", ] @@ -1607,7 +1367,7 @@ dependencies = [ "serde", "serde_ignored", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "strum 0.23.0", "strum_macros 0.23.1", "tar", @@ -1645,16 +1405,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" -[[package]] -name = "dyn-stack" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24269739c7c175bc12130622ef1a60b9ab2d5b30c0b9ce5110cd406d7fd497bc" -dependencies = [ - "bytemuck", - "reborrow", -] - [[package]] name = "ed25519" version = "1.5.3" @@ -1699,19 +1449,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "env_logger" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -1720,9 +1457,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +checksum = "add4f07d43996f76ef320709726a556a9d4f965d9410d8d0271132d2f8293480" dependencies = [ "errno-dragonfly", "libc", @@ -1744,9 +1481,6 @@ name = "esaxx-rs" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f748b253ceca9fed5f42f8b5ceb3851e93102199bc25b64b65369f76e5c0a35" -dependencies = [ - "cc", -] [[package]] name = "event-listener" @@ -1783,9 +1517,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fd-lock" @@ -1794,20 +1528,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b0377f1edc77dbd1118507bc7a66e4ab64d2b90c66f90726dc801e73a8c68f9" dependencies = [ "cfg-if", - "rustix 0.38.13", + "rustix 0.38.15", "windows-sys 0.48.0", ] -[[package]] -name = "file-per-thread-logger" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3cc21c33af89af0930c8cae4ade5e6fdc17b5d2c97b3d2e2edb67a1cf683f3" -dependencies = [ - "env_logger", - "log", -] - [[package]] name = "filetime" version = "0.2.22" @@ -1868,12 +1592,12 @@ dependencies = [ [[package]] name = "fs-set-times" -version = "0.19.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d167b646a876ba8fda6b50ac645cfd96242553cbaf0ca4fccaa39afcbf0801f" +checksum = "dd738b84894214045e8414eaded76359b4a5773f0a0a56b16575110739cdcf39" dependencies = [ - "io-lifetimes 1.0.11", - "rustix 0.38.13", + "io-lifetimes 2.0.2", + "rustix 0.38.15", "windows-sys 0.48.0", ] @@ -2059,7 +1783,7 @@ version = "0.2.0-dev" source = "git+https://github.com/rustformers/llm?rev=2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663#2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663" dependencies = [ "ggml-sys", - "memmap2 0.5.10", + "memmap2", "thiserror", ] @@ -2073,21 +1797,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" dependencies = [ - "fallible-iterator 0.2.0", - "indexmap 1.9.3", + "fallible-iterator 0.3.0", + "indexmap 2.0.2", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" - [[package]] name = "glob" version = "0.3.1" @@ -2109,7 +1827,7 @@ dependencies = [ "indexmap 1.9.3", "slab", "tokio", - "tokio-util 0.7.8", + "tokio-util 0.7.9", "tracing", ] @@ -2127,9 +1845,6 @@ checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" dependencies = [ "cfg-if", "crunchy", - "num-traits", - "rand 0.8.5", - "rand_distr", ] [[package]] @@ -2152,9 +1867,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" dependencies = [ "ahash 0.8.3", "allocator-api2", @@ -2166,7 +1881,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.0", + "hashbrown 0.14.1", ] [[package]] @@ -2289,12 +2004,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "hyper" version = "0.14.27" @@ -2404,24 +2113,13 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", -] - -[[package]] -name = "indicatif" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" -dependencies = [ - "console", - "lazy_static", - "number_prefix 0.3.0", - "regex", + "hashbrown 0.14.1", + "serde", ] [[package]] @@ -2432,7 +2130,7 @@ checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" dependencies = [ "console", "lazy_static", - "number_prefix 0.4.0", + "number_prefix", "regex", ] @@ -2462,11 +2160,11 @@ dependencies = [ [[package]] name = "io-extras" -version = "0.17.4" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fde93d48f0d9277f977a333eca8313695ddd5301dc96f7e02aeddcb0dd99096f" +checksum = "9d3c230ee517ee76b1cc593b52939ff68deda3fae9e41eca426c6b4993df51c4" dependencies = [ - "io-lifetimes 1.0.11", + "io-lifetimes 2.0.2", "windows-sys 0.48.0", ] @@ -2500,7 +2198,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.3", - "rustix 0.38.13", + "rustix 0.38.15", "windows-sys 0.48.0", ] @@ -2610,7 +2308,7 @@ dependencies = [ "hmac", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -2740,12 +2438,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "libm" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" - [[package]] name = "libsql-client" version = "0.31.11" @@ -2784,9 +2476,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" +checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db" [[package]] name = "llm" @@ -2808,7 +2500,7 @@ dependencies = [ "ggml", "half 2.3.1", "llm-samplers", - "memmap2 0.5.10", + "memmap2", "partial_sort", "rand 0.8.5", "regex", @@ -2916,18 +2608,19 @@ checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" [[package]] name = "md-5" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ + "cfg-if", "digest 0.10.7", ] [[package]] name = "memchr" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memfd" @@ -2935,7 +2628,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.13", + "rustix 0.38.15", ] [[package]] @@ -2947,24 +2640,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memmap2" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -3066,7 +2741,7 @@ dependencies = [ "thiserror", "tokio", "tokio-native-tls", - "tokio-util 0.7.8", + "tokio-util 0.7.9", "twox-hash", "url", ] @@ -3096,8 +2771,8 @@ dependencies = [ "saturating", "serde", "serde_json", - "sha1 0.10.5", - "sha2 0.10.7", + "sha1 0.10.6", + "sha2 0.10.8", "smallvec", "subprocess", "thiserror", @@ -3154,15 +2829,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-complex" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" -dependencies = [ - "num-traits", -] - [[package]] name = "num-integer" version = "0.1.45" @@ -3180,7 +2846,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", - "libm", ] [[package]] @@ -3202,12 +2867,6 @@ dependencies = [ "libc", ] -[[package]] -name = "number_prefix" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" - [[package]] name = "number_prefix" version = "0.4.0" @@ -3229,29 +2888,20 @@ dependencies = [ "serde", "serde_json", "serde_path_to_error", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "url", ] -[[package]] -name = "object" -version = "0.30.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" -dependencies = [ - "crc32fast", - "hashbrown 0.13.2", - "indexmap 1.9.3", - "memchr", -] - [[package]] name = "object" version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ + "crc32fast", + "hashbrown 0.14.1", + "indexmap 2.0.2", "memchr", ] @@ -3272,10 +2922,10 @@ dependencies = [ "reqwest", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "tokio", - "tokio-util 0.7.8", + "tokio-util 0.7.9", "tracing", "unicase", ] @@ -3409,7 +3059,7 @@ dependencies = [ [[package]] name = "outbound-http" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "http", @@ -3424,7 +3074,7 @@ dependencies = [ [[package]] name = "outbound-mysql" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "flate2", @@ -3440,7 +3090,7 @@ dependencies = [ [[package]] name = "outbound-pg" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "native-tls", @@ -3455,7 +3105,7 @@ dependencies = [ [[package]] name = "outbound-redis" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "redis", @@ -3467,9 +3117,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "e52c774a4c39359c1d1c52e43f73dd91a75a614652c825408eec30c95a9b2067" [[package]] name = "parking_lot" @@ -3569,7 +3219,7 @@ dependencies = [ "digest 0.10.7", "hmac", "password-hash", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -3707,7 +3357,7 @@ dependencies = [ "md-5", "memchr", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "stringprep", ] @@ -3782,9 +3432,9 @@ dependencies = [ [[package]] name = "pulldown-cmark" -version = "0.8.0" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffade02495f22453cd593159ea2f59827aae7f53fa8323f756799b670881dcf8" +checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" dependencies = [ "bitflags 1.3.2", "memchr", @@ -3868,16 +3518,6 @@ dependencies = [ "getrandom 0.2.10", ] -[[package]] -name = "rand_distr" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -3887,20 +3527,11 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "raw-cpuid" -version = "10.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -3919,22 +3550,14 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] -[[package]] -name = "reborrow" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2962bf2e1f971c53ef59b2d7ca51d6a5e5c4a9d2be47eb1f661a321a4da85888" - [[package]] name = "redis" version = "0.21.7" @@ -3953,7 +3576,7 @@ dependencies = [ "sha1 0.6.1", "tokio", "tokio-native-tls", - "tokio-util 0.7.8", + "tokio-util 0.7.9", "url", ] @@ -4001,11 +3624,11 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.5" +version = "1.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" dependencies = [ - "aho-corasick 1.1.0", + "aho-corasick 1.1.1", "memchr", "regex-automata", "regex-syntax", @@ -4013,11 +3636,11 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" dependencies = [ - "aho-corasick 1.1.0", + "aho-corasick 1.1.1", "memchr", "regex-syntax", ] @@ -4030,9 +3653,9 @@ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" -version = "0.11.20" +version = "0.11.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" +checksum = "78fdbab6a7e1d7b13cc8ff10197f47986b41c639300cc3c8158cac7847c9bbef" dependencies = [ "async-compression 0.4.3", "base64 0.21.4", @@ -4060,10 +3683,11 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", "tokio-native-tls", "tokio-rustls 0.24.1", - "tokio-util 0.7.8", + "tokio-util 0.7.9", "tower-service", "url", "wasm-bindgen", @@ -4187,30 +3811,30 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" +version = "0.37.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "4279d76516df406a8bd37e7dff53fd37d1a093f997a3c34a5c21658c126db06d" dependencies = [ "bitflags 1.3.2", "errno", "io-lifetimes 1.0.11", - "itoa", "libc", "linux-raw-sys 0.3.8", - "once_cell", "windows-sys 0.48.0", ] [[package]] name = "rustix" -version = "0.38.13" +version = "0.38.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +checksum = "d2f9da0cbd88f9f09e7814e388301c8414c51c62aa6ce1e4b5c551d49d96e531" dependencies = [ "bitflags 2.4.0", "errno", + "itoa", "libc", - "linux-raw-sys 0.4.7", + "linux-raw-sys 0.4.8", + "once_cell", "windows-sys 0.48.0", ] @@ -4258,9 +3882,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.5" +version = "0.101.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" dependencies = [ "ring", "untrusted", @@ -4278,16 +3902,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" -[[package]] -name = "safetensors" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93279b86b3de76f820a8854dd06cbc33cfa57a417b19c47f6a25280112fb1df" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "same-file" version = "1.0.6" @@ -4363,19 +3977,13 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" dependencies = [ "serde", ] -[[package]] -name = "seq-macro" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" - [[package]] name = "serde" version = "1.0.188" @@ -4507,9 +4115,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -4537,9 +4145,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -4663,9 +4271,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "socket2" @@ -4687,6 +4295,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "spdx" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b19b32ed6d899ab23174302ff105c1577e45a06b08d4fe0a9dd13ce804bbbf71" +dependencies = [ + "smallvec", +] + [[package]] name = "spin" version = "0.5.2" @@ -4696,7 +4313,7 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin-app" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "async-trait", @@ -4711,22 +4328,22 @@ dependencies = [ [[package]] name = "spin-common" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "dirs 4.0.0", - "sha2 0.10.7", + "sha2 0.10.8", "tokio", ] [[package]] name = "spin-componentize" version = "0.1.0" -source = "git+https://github.com/fermyon/spin-componentize?rev=75fd5117d77415737e337a7fd15ed3317e2ad7a5#75fd5117d77415737e337a7fd15ed3317e2ad7a5" +source = "git+https://github.com/fermyon/spin-componentize?rev=0fa79bfc60f20c172213e2a2c34bd0b3168960b0#0fa79bfc60f20c172213e2a2c34bd0b3168960b0" dependencies = [ "anyhow", - "wasm-encoder 0.29.0", - "wasmparser 0.107.0", + "wasm-encoder 0.32.0", + "wasmparser 0.112.0", "wit-component", "wit-parser", ] @@ -4734,7 +4351,7 @@ dependencies = [ [[package]] name = "spin-config" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "async-trait", @@ -4752,15 +4369,17 @@ dependencies = [ [[package]] name = "spin-core" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "async-trait", + "bytes", "cap-std", "crossbeam-channel", "io-extras", - "rustix 0.37.23", + "rustix 0.37.24", "system-interface", + "tokio", "tracing", "wasi-common", "wasmtime", @@ -4770,7 +4389,7 @@ dependencies = [ [[package]] name = "spin-http" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "http", @@ -4785,7 +4404,7 @@ dependencies = [ [[package]] name = "spin-key-value" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "lru 0.9.0", @@ -4799,7 +4418,7 @@ dependencies = [ [[package]] name = "spin-key-value-azure" version = "0.1.0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "azure_data_cosmos", @@ -4814,7 +4433,7 @@ dependencies = [ [[package]] name = "spin-key-value-redis" version = "0.1.0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "redis", @@ -4828,7 +4447,7 @@ dependencies = [ [[package]] name = "spin-key-value-sqlite" version = "0.1.0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "once_cell", @@ -4842,7 +4461,7 @@ dependencies = [ [[package]] name = "spin-llm" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "bytesize", @@ -4852,34 +4471,10 @@ dependencies = [ "spin-world", ] -[[package]] -name = "spin-llm-local" -version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" -dependencies = [ - "anyhow", - "candle-core", - "candle-nn", - "chrono", - "llm", - "lru 0.9.0", - "num_cpus", - "rand 0.8.5", - "safetensors", - "serde", - "spin-core", - "spin-llm", - "spin-world", - "terminal", - "tokenizers", - "tokio", - "tracing", -] - [[package]] name = "spin-llm-remote-http" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "http", @@ -4895,7 +4490,7 @@ dependencies = [ [[package]] name = "spin-loader" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "async-trait", @@ -4931,7 +4526,7 @@ dependencies = [ [[package]] name = "spin-manifest" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "indexmap 1.9.3", "serde", @@ -4942,7 +4537,7 @@ dependencies = [ [[package]] name = "spin-oci" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "base64 0.21.4", @@ -4967,7 +4562,7 @@ dependencies = [ [[package]] name = "spin-sqlite" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "async-trait", @@ -4981,7 +4576,7 @@ dependencies = [ [[package]] name = "spin-sqlite-inproc" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "async-trait", @@ -4996,7 +4591,7 @@ dependencies = [ [[package]] name = "spin-sqlite-libsql" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "async-trait", @@ -5011,11 +4606,11 @@ dependencies = [ [[package]] name = "spin-trigger" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "async-trait", - "clap 3.2.25", + "clap", "ctrlc", "dirs 4.0.0", "futures", @@ -5037,7 +4632,6 @@ dependencies = [ "spin-key-value-redis", "spin-key-value-sqlite", "spin-llm", - "spin-llm-local", "spin-llm-remote-http", "spin-loader", "spin-manifest", @@ -5056,11 +4650,11 @@ dependencies = [ [[package]] name = "spin-trigger-http" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "anyhow", "async-trait", - "clap 3.2.25", + "clap", "futures", "futures-util", "http", @@ -5089,7 +4683,7 @@ dependencies = [ [[package]] name = "spin-world" version = "1.6.0-pre0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "wasmtime", ] @@ -5257,20 +4851,41 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "system-interface" -version = "0.25.9" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10081a99cbecbc363d381b9503563785f0b02735fccbb0d4c1a2cb3d39f7e7fe" +checksum = "27ce32341b2c0b70c144bbf35627fdc1ef18c76ced5e5e7b3ee8b5ba6b2ab6a0" dependencies = [ "bitflags 2.4.0", "cap-fs-ext", "cap-std", "fd-lock", "io-lifetimes 2.0.2", - "rustix 0.38.13", + "rustix 0.38.15", "windows-sys 0.48.0", - "winx 0.36.2", + "winx", ] [[package]] @@ -5303,9 +4918,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", - "fastrand 2.0.0", + "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.13", + "rustix 0.38.15", "windows-sys 0.48.0", ] @@ -5321,7 +4936,7 @@ dependencies = [ [[package]] name = "terminal" version = "0.1.0" -source = "git+https://github.com/fermyon/spin?rev=8cb61d9babaae3737c8033de5ea8d3304919de80#8cb61d9babaae3737c8033de5ea8d3304919de80" +source = "git+https://github.com/fermyon/spin?rev=56e6e17a7e7fd6e29a58431b8af4838e3596d803#56e6e17a7e7fd6e29a58431b8af4838e3596d803" dependencies = [ "atty", "once_cell", @@ -5336,18 +4951,18 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", @@ -5356,9 +4971,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ "deranged", "itoa", @@ -5371,15 +4986,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -5421,12 +5036,10 @@ checksum = "aea68938177975ab09da68552b720eac941779ff386baceaf77e0f5f9cea645f" dependencies = [ "aho-corasick 0.7.20", "cached-path", - "clap 4.4.4", "derive_builder 0.12.0", "dirs 4.0.0", "esaxx-rs", "getrandom 0.2.10", - "indicatif 0.15.0", "itertools 0.9.0", "lazy_static", "log", @@ -5511,7 +5124,7 @@ dependencies = [ "rand 0.8.5", "socket2 0.5.4", "tokio", - "tokio-util 0.7.8", + "tokio-util 0.7.9", "whoami", ] @@ -5578,9 +5191,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -5762,12 +5375,6 @@ dependencies = [ "serde", ] -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - [[package]] name = "uuid" version = "1.4.1" @@ -5823,9 +5430,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" @@ -5860,9 +5467,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-cap-std-sync" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2fe3aaf51c1e1a04a490e89f0a9cab789d21a496c0ce398d49a24f8df883a58" +checksum = "ec076cd75f207327f5bfaebb915ef03d82c3a01a6d9b5d0deb6eafffceab3095" dependencies = [ "anyhow", "async-trait", @@ -5872,10 +5479,10 @@ dependencies = [ "cap-time-ext", "fs-set-times", "io-extras", - "io-lifetimes 1.0.11", + "io-lifetimes 2.0.2", "is-terminal", "once_cell", - "rustix 0.37.23", + "rustix 0.38.15", "system-interface", "tracing", "wasi-common", @@ -5884,17 +5491,17 @@ dependencies = [ [[package]] name = "wasi-common" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74e9a2c8bfda59870a8bff38a31b9ba80b6fdb7abdfd2487177b85537d2e8a8" +checksum = "3f391b334c783c1154369be62c31dc8598ffa1a6c34ea05d7f8cf0b18ce7c272" dependencies = [ "anyhow", - "bitflags 1.3.2", + "bitflags 2.4.0", "cap-rand", "cap-std", "io-extras", "log", - "rustix 0.37.23", + "rustix 0.38.15", "thiserror", "tracing", "wasmtime", @@ -5904,15 +5511,15 @@ dependencies = [ [[package]] name = "wasi-tokio" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6014a120600e99067c99a347e4ffa7d783def8f4a3154b44e5d1382539ff78ef" +checksum = "6de05e4d9f81b8e82672cff04bab4128a170274ed2c44ff4c9e36905aefcaf35" dependencies = [ "anyhow", "cap-std", "io-extras", - "io-lifetimes 1.0.11", - "rustix 0.37.23", + "io-lifetimes 2.0.2", + "rustix 0.38.15", "tokio", "wasi-cap-std-sync", "wasi-common", @@ -5987,33 +5594,35 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-encoder" -version = "0.29.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18c41dbd92eaebf3612a39be316540b8377c871cb9bde6b064af962984912881" +checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" dependencies = [ "leb128", ] [[package]] name = "wasm-encoder" -version = "0.33.1" +version = "0.33.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39de0723a53d3c8f54bed106cfbc0d06b3e4d945c5c5022115a61e3b29183ae" +checksum = "34180c89672b3e4825c3a8db4b61a674f1447afd5fe2445b2d22c3d8b6ea086c" dependencies = [ "leb128", ] [[package]] name = "wasm-metadata" -version = "0.8.0" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36e5156581ff4a302405c44ca7c85347563ca431d15f1a773f12c9c7b9a6cdc9" +checksum = "577508d8a45bc54ad97efe77c95ba57bb10e7e5c5bac9c31295ce88b8045cd7d" dependencies = [ "anyhow", - "indexmap 1.9.3", + "indexmap 2.0.2", "serde", - "wasm-encoder 0.29.0", - "wasmparser 0.107.0", + "serde_json", + "spdx", + "wasm-encoder 0.33.2", + "wasmparser 0.113.2", ] [[package]] @@ -6031,39 +5640,39 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.107.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +checksum = "e986b010f47fcce49cf8ea5d5f9e5d2737832f12b53ae8ae785bbe895d0877bf" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.0.2", "semver", ] [[package]] name = "wasmparser" -version = "0.113.1" +version = "0.113.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a128cea7b8516703ab41b10a0b1aa9ba18d0454cd3792341489947ddeee268db" +checksum = "1fd0d44fab0bd78404e352f3399324eef76516a4580b52bc9031c60f064e98f3" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "semver", ] [[package]] name = "wasmprinter" -version = "0.2.66" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2e5e818f88cee5311e9a5df15cba0a8f772978baf3109af97004bce6e8e3c6" +checksum = "f6615a5587149e753bf4b93f90fa3c3f41c88597a7a2da72879afcabeda9648f" dependencies = [ "anyhow", - "wasmparser 0.113.1", + "wasmparser 0.113.2", ] [[package]] name = "wasmtime" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc104ced94ff0a6981bde77a0bc29aab4af279914a4143b8d1af9fd4b2c9d41" +checksum = "16ed7db409c1acf60d33128b2a38bee25aaf38c4bd955ab98a5b623c8294593c" dependencies = [ "anyhow", "async-trait", @@ -6072,18 +5681,20 @@ dependencies = [ "cfg-if", "encoding_rs", "fxprof-processed-profile", - "indexmap 1.9.3", + "indexmap 2.0.2", "libc", "log", - "object 0.30.4", + "object", "once_cell", "paste", "psm", "rayon", "serde", + "serde_derive", "serde_json", "target-lexicon", - "wasmparser 0.107.0", + "wasm-encoder 0.32.0", + "wasmparser 0.112.0", "wasmtime-cache", "wasmtime-component-macro", "wasmtime-component-util", @@ -6099,28 +5710,28 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b28e5661a9b5f7610a62ab3c69222fa161f7bd31d04529e856461d8c3e706b" +checksum = "53af0f8f6271bd687fe5632c8fe0a0f061d0aa1b99a0cd4e1df8e4cbeb809d2f" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f58ddfe801df3886feaf466d883ea37e941bcc6d841b9f644a08c7acabfe7f8" +checksum = "41376a7c094335ee08abe6a4eff79a32510cc805a249eff1b5e7adf0a42e7cdf" dependencies = [ "anyhow", "base64 0.21.4", "bincode", "directories-next", - "file-per-thread-logger", "log", - "rustix 0.37.23", + "rustix 0.38.15", "serde", - "sha2 0.10.7", + "serde_derive", + "sha2 0.10.8", "toml", "windows-sys 0.48.0", "zstd", @@ -6128,14 +5739,14 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39725d9633fb064bd3a6d83c5ea5077289256de0862d3d96295822edb13419c0" +checksum = "74ab5b291f2dad56f1e6929cc61fb7cac68845766ca77c3838b5d05d82c33976" dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", "wasmtime-component-util", "wasmtime-wit-bindgen", "wit-parser", @@ -6143,66 +5754,69 @@ dependencies = [ [[package]] name = "wasmtime-component-util" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1153feafc824f95dc69472cb89a3396b3b05381f781a7508b01840f9df7b1a51" +checksum = "21436177bf19f6b60dc0b83ad5872e849892a4a90c3572785e1a28c0e2e1132c" [[package]] name = "wasmtime-cranelift" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc1e39ce9aa0fa0b319541ed423960b06cfa7343eca1574f811ea34275739c2" +checksum = "920e42058862d1f7a3dd3fca73cb495a20d7506e3ada4bbc0a9780cd636da7ca" dependencies = [ "anyhow", + "cfg-if", "cranelift-codegen", "cranelift-control", "cranelift-entity", "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.27.3", + "gimli", "log", - "object 0.30.4", + "object", "target-lexicon", "thiserror", - "wasmparser 0.107.0", + "wasmparser 0.112.0", "wasmtime-cranelift-shared", "wasmtime-environ", + "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-cranelift-shared" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dd32739326690e51c76551d7cbf29d371e7de4dc7b37d2d503be314ab5b7d04" +checksum = "516d63bbe18219e64a9705cf3a2c865afe1fb711454ea03091dc85a1d708194d" dependencies = [ "anyhow", "cranelift-codegen", "cranelift-control", "cranelift-native", - "gimli 0.27.3", - "object 0.30.4", + "gimli", + "object", "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b60e4ae5c9ae81750d8bc59110bf25444aa1d9266c19999c3b64b801db3c73" +checksum = "59cef239d663885f1427f8b8f4fde7be6075249c282580d94b480f11953ca194" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.27.3", - "indexmap 1.9.3", + "gimli", + "indexmap 2.0.2", "log", - "object 0.30.4", + "object", "serde", + "serde_derive", "target-lexicon", "thiserror", - "wasm-encoder 0.29.0", - "wasmparser 0.107.0", + "wasm-encoder 0.32.0", + "wasmparser 0.112.0", "wasmprinter", "wasmtime-component-util", "wasmtime-types", @@ -6210,35 +5824,37 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd40c8d869916ee6b1f3fcf1858c52041445475ca8550aee81c684c0eb530ca" +checksum = "2ef118b557df6193cd82cfb45ab57cd12388fedfe2bb76f090b2d77c96c1b56e" dependencies = [ "cc", "cfg-if", - "rustix 0.37.23", + "rustix 0.38.15", "wasmtime-asm-macros", + "wasmtime-versioned-export-macros", "windows-sys 0.48.0", ] [[package]] name = "wasmtime-jit" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655b23a10eddfe7814feb548a466f3f25aa4bb4f43098a147305c544a2de28e1" +checksum = "c8089d5909b8f923aad57702ebaacb7b662aa9e43a3f71e83e025c5379a1205f" dependencies = [ - "addr2line 0.19.0", + "addr2line", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli 0.27.3", + "gimli", "ittapi", "log", - "object 0.30.4", + "object", "rustc-demangle", - "rustix 0.37.23", + "rustix 0.38.15", "serde", + "serde_derive", "target-lexicon", "wasmtime-environ", "wasmtime-jit-debug", @@ -6249,20 +5865,21 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e46b7e98979a69d3df093076bde8431204e3c96a770e8d216fea365c627d88a4" +checksum = "9b13924aedf6799ad66edb25500a20e3226629978b30a958c55285352bad130a" dependencies = [ - "object 0.30.4", + "object", "once_cell", - "rustix 0.37.23", + "rustix 0.38.15", + "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb1e7c68ede63dc7a98c3e473162954e224951854e229c8b4e74697fe17dbdd" +checksum = "c6ff5f3707a5e3797deeeeac6ac26b2e1dd32dbc06693c0ab52e8ac4d18ec706" dependencies = [ "cfg-if", "libc", @@ -6271,62 +5888,84 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843e33bf9e0f0c57902c87a1dea1389cc23865c65f007214318dbdfcb3fd4ae5" +checksum = "11ab4ce04ac05342edfa7f42895f2a5d8b16ee914330869acb865cd1facf265f" dependencies = [ "anyhow", "cc", "cfg-if", "encoding_rs", - "indexmap 1.9.3", + "indexmap 2.0.2", "libc", "log", "mach", "memfd", - "memoffset 0.8.0", + "memoffset", "paste", "rand 0.8.5", - "rustix 0.37.23", + "rustix 0.38.15", "sptr", + "wasm-encoder 0.32.0", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-fiber", "wasmtime-jit-debug", + "wasmtime-versioned-export-macros", + "wasmtime-wmemcheck", "windows-sys 0.48.0", ] [[package]] name = "wasmtime-types" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7473a07bebd85671bada453123e3d465c8e0a59668ff79f5004076e6a2235ef5" +checksum = "ecf61e21d5bd95e1ad7fa42b7bdabe21220682d6a6046d376edca29760849222" dependencies = [ "cranelift-entity", "serde", + "serde_derive", "thiserror", - "wasmparser 0.107.0", + "wasmparser 0.112.0", +] + +[[package]] +name = "wasmtime-versioned-export-macros" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe877472cbdd6d96b4ecdc112af764e3b9d58c2e4175a87828f892ab94c60643" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.37", ] [[package]] name = "wasmtime-wasi" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff7b3b3272ad5b4ba63c9aac6248da6f06a8227d0c0d6017d89225d794e966c" +checksum = "b6db393deb775e8bece53a6869be6425e46b28426aa7709df8c529a19759f4be" dependencies = [ "anyhow", "async-trait", - "bitflags 1.3.2", + "bitflags 2.4.0", + "bytes", "cap-fs-ext", + "cap-net-ext", "cap-rand", "cap-std", "cap-time-ext", "fs-set-times", + "futures", "io-extras", + "io-lifetimes 2.0.2", + "is-terminal", "libc", - "rustix 0.37.23", + "once_cell", + "rustix 0.38.15", "system-interface", "thiserror", + "tokio", "tracing", "wasi-cap-std-sync", "wasi-common", @@ -6338,16 +5977,16 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351c9d4e60658dd0cf616c12c5508f86cc2cefcc0cff307eed0a31b23d3c0b70" +checksum = "0bc5a770003807c55f2187a0092dea01722b0e24151e35816bd5091538bb8e88" dependencies = [ "anyhow", "cranelift-codegen", - "gimli 0.27.3", - "object 0.30.4", + "gimli", + "object", "target-lexicon", - "wasmparser 0.107.0", + "wasmparser 0.112.0", "wasmtime-cranelift-shared", "wasmtime-environ", "winch-codegen", @@ -6355,15 +5994,22 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f114407efbd09e4ef67053b6ae54c16455a821ef2f6096597fcba83b7625e59c" +checksum = "62003d48822f89cc393e93643366ddbee1766779c0874353b8ba2ede4679fbf9" dependencies = [ "anyhow", "heck 0.4.1", + "indexmap 2.0.2", "wit-parser", ] +[[package]] +name = "wasmtime-wmemcheck" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5412bb464066d64c3398c96e6974348f90fa2a55110ad7da3f9295438cd4de84" + [[package]] name = "wast" version = "35.0.2" @@ -6375,23 +6021,23 @@ dependencies = [ [[package]] name = "wast" -version = "65.0.1" +version = "65.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd8c1cbadf94a0b0d1071c581d3cfea1b7ed5192c79808dd15406e508dd0afb" +checksum = "a55a88724cf8c2c0ebbf32c8e8f4ac0d6aa7ba6d73a1cfd94b254aa8f894317e" dependencies = [ "leb128", "memchr", "unicode-width", - "wasm-encoder 0.33.1", + "wasm-encoder 0.33.2", ] [[package]] name = "wat" -version = "1.0.73" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3209e35eeaf483714f4c6be93f4a03e69aad5f304e3fa66afa7cb90fe1c8051f" +checksum = "d83e1a8d86d008adc7bafa5cf4332d448699a08fcf2a715a71fbb75e2c5ca188" dependencies = [ - "wast 65.0.1", + "wast 65.0.2", ] [[package]] @@ -6406,9 +6052,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.1" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" +checksum = "07ecc0cd7cac091bf682ec5efa18b1cff79d617b84181f38b3951dbe135f607f" dependencies = [ "ring", "untrusted", @@ -6432,13 +6078,13 @@ dependencies = [ [[package]] name = "wiggle" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63f150c6e39ef29a58139564c5ed7a0ef34d6df8a8eecd4233af85a576968d9" +checksum = "da341f21516453768bd115bdc17b186c0a1ab6773c2b2eeab44a062db49bd616" dependencies = [ "anyhow", "async-trait", - "bitflags 1.3.2", + "bitflags 2.4.0", "thiserror", "tracing", "wasmtime", @@ -6447,28 +6093,28 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f31e961fb0a5ad3ff10689c85f327f4abf10b4cac033b9d7372ccbb106aea24" +checksum = "e22c6bd943a4bae37052b79d249fb32d7afa22b3f6a147a5f2e7bc2b9f901879" dependencies = [ "anyhow", "heck 0.4.1", "proc-macro2", "quote", "shellexpand 2.1.2", - "syn 1.0.109", + "syn 2.0.37", "witx", ] [[package]] name = "wiggle-macro" -version = "10.0.2" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a28ae3d6b90f212beca7fab5910d0a3b1a171290c06eaa81bb39f41e6f74589" +checksum = "7d72d838b7c9302b2ca7c44f36d6af5ce1988239a16deba951d99c4630d17caf" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", "wiggle-generate", ] @@ -6490,9 +6136,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -6505,17 +6151,17 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.8.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf2ac354be169bb201de7867b84f45d91d0ef812f67f11c33f74a7f5a24e56" +checksum = "50647204d600a2a112eefac0645ba6653809a15bd362c7e4e6a049a5bdff0de9" dependencies = [ "anyhow", "cranelift-codegen", - "gimli 0.27.3", + "gimli", "regalloc2", "smallvec", "target-lexicon", - "wasmparser 0.107.0", + "wasmparser 0.112.0", "wasmtime-environ", ] @@ -6670,17 +6316,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "winx" -version = "0.35.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c52a121f0fbf9320d5f2a9a5d82f6cb7557eda5e8b47fc3e7f359ec866ae960" -dependencies = [ - "bitflags 1.3.2", - "io-lifetimes 1.0.11", - "windows-sys 0.48.0", -] - [[package]] name = "winx" version = "0.36.2" @@ -6693,32 +6328,36 @@ dependencies = [ [[package]] name = "wit-component" -version = "0.11.0" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cbd4c7f8f400327c482c88571f373844b7889e61460650d650fc5881bb3575c" +checksum = "ee23614740bf871dac9856e3062c7a308506eb3f0a2759939ab8d0aa8436a1c0" dependencies = [ "anyhow", - "bitflags 1.3.2", - "indexmap 1.9.3", + "bitflags 2.4.0", + "indexmap 2.0.2", "log", - "wasm-encoder 0.29.0", + "serde", + "serde_json", + "wasm-encoder 0.33.2", "wasm-metadata", - "wasmparser 0.107.0", + "wasmparser 0.113.2", "wit-parser", ] [[package]] name = "wit-parser" -version = "0.8.0" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6daec9f093dbaea0e94043eeb92ece327bbbe70c86b1f41aca9bbfefd7f050f0" +checksum = "a39edca9abb16309def3843af73b58d47d243fe33a9ceee572446bcc57556b9a" dependencies = [ "anyhow", "id-arena", - "indexmap 1.9.3", + "indexmap 2.0.2", "log", "pulldown-cmark", "semver", + "serde", + "serde_json", "unicode-xid", "url", ] @@ -6788,7 +6427,7 @@ dependencies = [ "flate2", "hmac", "pbkdf2", - "sha1 0.10.5", + "sha1 0.10.6", "time", "zstd", ] diff --git a/Cargo.toml b/Cargo.toml index f7e1dc9..d92668e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,13 +32,15 @@ semver = "1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0.82" sha2 = "0.10.2" -spin-common = { git = "https://github.com/fermyon/spin", rev = "8cb61d9babaae3737c8033de5ea8d3304919de80" } -spin-loader = { git = "https://github.com/fermyon/spin", rev = "8cb61d9babaae3737c8033de5ea8d3304919de80" } -spin-manifest = { git = "https://github.com/fermyon/spin", rev = "8cb61d9babaae3737c8033de5ea8d3304919de80" } -spin-http = { git = "https://github.com/fermyon/spin", rev = "8cb61d9babaae3737c8033de5ea8d3304919de80" } -spin-oci = { git = "https://github.com/fermyon/spin", rev = "8cb61d9babaae3737c8033de5ea8d3304919de80" } -spin-trigger-http = { git = "https://github.com/fermyon/spin", rev = "8cb61d9babaae3737c8033de5ea8d3304919de80" } -terminal = { git = "https://github.com/fermyon/spin", rev = "8cb61d9babaae3737c8033de5ea8d3304919de80" } +spin-app = { git = "https://github.com/fermyon/spin", rev = "56e6e17a7e7fd6e29a58431b8af4838e3596d803" } +spin-common = { git = "https://github.com/fermyon/spin", rev = "56e6e17a7e7fd6e29a58431b8af4838e3596d803" } +spin-loader = { git = "https://github.com/fermyon/spin", rev = "56e6e17a7e7fd6e29a58431b8af4838e3596d803" } +spin-manifest = { git = "https://github.com/fermyon/spin", rev = "56e6e17a7e7fd6e29a58431b8af4838e3596d803" } +spin-http = { git = "https://github.com/fermyon/spin", rev = "56e6e17a7e7fd6e29a58431b8af4838e3596d803" } +spin-oci = { git = "https://github.com/fermyon/spin", rev = "56e6e17a7e7fd6e29a58431b8af4838e3596d803" } +spin-trigger = { git = "https://github.com/fermyon/spin", rev = "56e6e17a7e7fd6e29a58431b8af4838e3596d803" } +spin-trigger-http = { git = "https://github.com/fermyon/spin", rev = "56e6e17a7e7fd6e29a58431b8af4838e3596d803" } +terminal = { git = "https://github.com/fermyon/spin", rev = "56e6e17a7e7fd6e29a58431b8af4838e3596d803" } tempfile = "3.3.0" url = "2.3" uuid = { version = "1.3", features = ["v4"] } diff --git a/src/commands/deploy.rs b/src/commands/deploy.rs index 21d941c..d210ef8 100644 --- a/src/commands/deploy.rs +++ b/src/commands/deploy.rs @@ -11,15 +11,14 @@ use rand::Rng; use semver::BuildMetadata; use spin_common::{arg_parser::parse_kv, sloth}; use spin_http::{app_info::AppInfo, routes::RoutePattern}; -use spin_loader::local::config::{self, RawAppManifest}; -use spin_manifest::{ApplicationTrigger, HttpTriggerConfiguration, TriggerConfig}; +use spin_manifest::ApplicationTrigger; use tokio::fs; use tracing::instrument; use std::{ collections::HashSet, io::{self, Write}, - path::PathBuf, + path::{Path, PathBuf}, }; use url::Url; use uuid::Uuid; @@ -49,17 +48,37 @@ const SPIN_DEFAULT_DATABASE: &str = "default"; #[derive(Parser, Debug)] #[clap(about = "Package and upload an application to the Fermyon Cloud")] pub struct DeployCommand { - /// The application to deploy. This may be a manifest (spin.toml) file, or a - /// directory containing a spin.toml file. + /// The application to deploy. This may be a manifest (spin.toml) file, a + /// directory containing a spin.toml file, or a remote registry reference. /// If omitted, it defaults to "spin.toml". #[clap( - name = APP_MANIFEST_FILE_OPT, + name = APPLICATION_OPT, short = 'f', long = "from", + group = "source", + )] + pub app_source: Option, + + /// The application to deploy. This is the same as `--from` but forces the + /// application to be interpreted as a file or directory path. + #[clap( + hide = true, + name = APP_MANIFEST_FILE_OPT, + long = "from-file", alias = "file", - default_value = DEFAULT_MANIFEST_FILE + group = "source", )] - pub app_source: PathBuf, + pub file_source: Option, + + /// The application to deploy. This is the same as `--from` but forces the + /// application to be interpreted as an OCI registry reference. + #[clap( + hide = true, + name = FROM_REGISTRY_OPT, + long = "from-registry", + group = "source", + )] + pub registry_source: Option, /// Disable attaching buildinfo #[clap( @@ -77,7 +96,9 @@ pub struct DeployCommand { )] pub buildinfo: Option, - /// Specifies to perform `spin build` before deploying the application. + /// For local apps, specifies to perform `spin build` before deploying the application. + /// + /// This is ignored on remote applications, as they are already built. #[clap(long, takes_value = false, env = "SPIN_ALWAYS_BUILD")] pub build: bool, @@ -124,8 +145,41 @@ impl DeployCommand { .map_err(|e| anyhow!("{:?}\n\nLearn more at {}", e, DEVELOPER_CLOUD_FAQ)) } - fn app(&self) -> anyhow::Result { - spin_common::paths::resolve_manifest_file_path(&self.app_source) + fn resolve_app_source(&self) -> AppSource { + match (&self.app_source, &self.file_source, &self.registry_source) { + (None, None, None) => self.default_manifest_or_none(), + (Some(source), None, None) => Self::infer_source(source), + (None, Some(file), None) => Self::infer_file_source(file.to_owned()), + (None, None, Some(reference)) => AppSource::OciRegistry(reference.to_owned()), + _ => AppSource::unresolvable("More than one application source was specified"), + } + } + + fn default_manifest_or_none(&self) -> AppSource { + let default_manifest = PathBuf::from(DEFAULT_MANIFEST_FILE); + if default_manifest.exists() { + AppSource::File(default_manifest) + } else { + AppSource::None + } + } + + fn infer_source(source: &str) -> AppSource { + let path = PathBuf::from(source); + if path.exists() { + Self::infer_file_source(path) + } else if spin_oci::is_probably_oci_reference(source) { + AppSource::OciRegistry(source.to_owned()) + } else { + AppSource::Unresolvable(format!("File or directory '{source}' not found. If you meant to load from a registry, use the `--from-registry` option.")) + } + } + + fn infer_file_source(path: impl Into) -> AppSource { + match spin_common::paths::resolve_manifest_file_path(path.into()) { + Ok(file) => AppSource::File(file), + Err(e) => AppSource::Unresolvable(e.to_string()), + } } async fn deploy_cloud(self, login_connection: LoginConnection) -> Result<()> { @@ -137,18 +191,6 @@ impl DeployCommand { let client = CloudClient::new(connection_config.clone()); - let cfg_any = spin_loader::local::raw_manifest_from_file(&self.app()?).await?; - let cfg = cfg_any.into_v1(); - - validate_cloud_app(&cfg)?; - self.validate_deployment_environment(&cfg, &client).await?; - - match cfg.info.trigger { - ApplicationTrigger::Http(_) => {} - ApplicationTrigger::Redis(_) => bail!("Redis triggers are not supported"), - ApplicationTrigger::External(_) => bail!("External triggers are not supported"), - } - let buildinfo = if !self.no_buildinfo { match &self.buildinfo { Some(i) => Some(i.clone()), @@ -158,9 +200,13 @@ impl DeployCommand { None }; - let app_file = spin_common::paths::resolve_manifest_file_path(&self.app_source)?; let dir = tempfile::tempdir()?; - let application = spin_loader::local::from_file(&app_file, Some(dir.path())).await?; + + let application = self.load_cloud_app(dir.path()).await?; + + validate_cloud_app(&application)?; + self.validate_deployment_environment(&application, &client) + .await?; // TODO: can remove once spin_oci inlines small files by default std::env::set_var("SPIN_OCI_SKIP_INLINED_FILES", "true"); @@ -173,12 +219,14 @@ impl DeployCommand { ) .await?; - let name = sanitize_app_name(&application.info.name); + let name = sanitize_app_name(application.name()?); let storage_id = format!("oci://{}", name); let version = sanitize_app_version( - &(application.info.version - + "-" - + &buildinfo.clone().context("Cannot parse build info")?), + &(format!( + "{}-{}", + application.version()?, + buildinfo.clone().context("Cannot parse build info")? + )), ); println!("Deploying..."); @@ -186,7 +234,7 @@ impl DeployCommand { // Create or update app let channel_id = match get_app_id_cloud(&client, &name).await? { Some(app_id) => { - let labels = sqlite_labels_used(&cfg); + let labels = application.sqlite_databases(); if !labels.is_empty() && create_and_link_databases_for_existing_app(&client, &name, app_id, labels) .await? @@ -231,7 +279,7 @@ impl DeployCommand { existing_channel_id } None => { - let labels = sqlite_labels_used(&cfg); + let labels = application.sqlite_databases(); let databases_to_link = match create_databases_for_new_app(&client, &name, labels).await? { Some(dbs) => dbs, @@ -284,7 +332,8 @@ impl DeployCommand { .await .context("Problem getting channel by id")?; let app_base_url = build_app_base_url(&channel.domain, &login_connection.url)?; - if let Ok(http_config) = HttpTriggerConfiguration::try_from(cfg.info.trigger.clone()) { + let (http_base, http_routes) = application.http_routes(); + if !http_routes.is_empty() { wait_for_ready( &app_base_url, &digest.unwrap_or_default(), @@ -292,7 +341,8 @@ impl DeployCommand { Destination::Cloud(connection_config.clone().url), ) .await; - print_available_routes(&app_base_url, &http_config.base, &cfg); + let base = http_base.unwrap_or_else(|| "/".to_owned()); + print_available_routes(&app_base_url, &base, &http_routes); } else { println!("Application is running at {}", channel.domain); } @@ -300,19 +350,72 @@ impl DeployCommand { Ok(()) } + async fn load_cloud_app(&self, working_dir: &Path) -> Result { + let app_source = self.resolve_app_source(); + + match &app_source { + AppSource::File(app_file) => { + let cfg_any = spin_loader::local::raw_manifest_from_file(&app_file).await?; + let cfg = cfg_any.into_v1(); + + match cfg.info.trigger { + ApplicationTrigger::Http(_) => {} + ApplicationTrigger::Redis(_) => bail!("Redis triggers are not supported"), + ApplicationTrigger::External(_) => bail!("External triggers are not supported"), + } + + let app = spin_loader::from_file(app_file, Some(working_dir)).await?; + let locked_app = spin_trigger::locked::build_locked_app(app, working_dir)?; + + Ok(DeployableApp(locked_app)) + } + AppSource::OciRegistry(reference) => { + let mut oci_client = spin_oci::Client::new(false, None) + .await + .context("cannot create registry client")?; + + let locked_app = spin_oci::OciLoader::new(working_dir) + .load_app(&mut oci_client, reference) + .await?; + + let unsupported_triggers = locked_app + .triggers + .iter() + .filter(|t| t.trigger_type != "http") + .map(|t| format!("'{}'", t.trigger_type)) + .collect::>(); + if !unsupported_triggers.is_empty() { + bail!( + "Non-HTTP triggers are not supported - app uses {}", + unsupported_triggers.join(", ") + ); + } + + Ok(DeployableApp(locked_app)) + } + AppSource::None => { + anyhow::bail!("Default file '{DEFAULT_MANIFEST_FILE}' not found."); + } + AppSource::Unresolvable(err) => { + anyhow::bail!("{err}"); + } + } + } + async fn validate_deployment_environment( &self, - app: &RawAppManifest, + app: &DeployableApp, client: &CloudClient, ) -> Result<()> { let required_variables = app + .0 .variables .iter() - .filter(|(_, v)| v.required) + .filter(|(_, v)| v.default.is_none()) .map(|(k, _)| k) .collect::>(); if !required_variables.is_empty() { - self.ensure_variables_present(&required_variables, client, &app.info.name) + self.ensure_variables_present(&required_variables, client, app.name()?) .await?; } Ok(()) @@ -441,7 +544,7 @@ impl DeployCommand { async fn push_oci( &self, - application: spin_manifest::Application, + application: DeployableApp, buildinfo: Option, connection_config: ConnectionConfig, ) -> Result> { @@ -459,17 +562,15 @@ impl DeployCommand { format!( "{}/{}:{}", cloud_registry_host, - &sanitize_app_name(&application.info.name), - &sanitize_app_version( - &(application.info.version.to_owned() + "-" + &buildinfo), - ) + &sanitize_app_name(application.name()?), + &sanitize_app_version(&(application.version()?.to_owned() + "-" + &buildinfo),) ) } None => { format!( "{}/{}", cloud_registry_host, - &sanitize_app_name(&application.info.name) + &sanitize_app_name(application.name()?) ) } }; @@ -488,28 +589,50 @@ impl DeployCommand { println!( "Uploading {} version {} to Fermyon Cloud...", &oci_ref.repository(), - &oci_ref.tag().unwrap_or(&application.info.version) + &oci_ref.tag().unwrap_or(application.version()?) ); - let digest = client.push(&application, reference).await?; + let digest = client.push_locked(application.0, reference).await?; Ok(digest) } async fn run_spin_build(&self) -> Result<()> { - let manifest_path = self.app()?; - let spin_bin = spin::bin_path()?; + self.resolve_app_source().build().await + } +} - let result = tokio::process::Command::new(spin_bin) - .args(["build", "-f"]) - .arg(&manifest_path) - .status() - .await - .context("Failed to execute `spin build` command")?; +#[derive(Debug, PartialEq, Eq)] +enum AppSource { + None, + File(PathBuf), + OciRegistry(String), + Unresolvable(String), +} - if result.success() { - Ok(()) - } else { - Err(anyhow!("Build failed: deployment cancelled")) +impl AppSource { + fn unresolvable(message: impl Into) -> Self { + Self::Unresolvable(message.into()) + } + + async fn build(&self) -> anyhow::Result<()> { + match self { + Self::File(manifest_path) => { + let spin_bin = spin::bin_path()?; + + let result = tokio::process::Command::new(spin_bin) + .args(["build", "-f"]) + .arg(manifest_path) + .status() + .await + .context("Failed to execute `spin build` command")?; + + if result.success() { + Ok(()) + } else { + Err(anyhow!("Build failed: deployment cancelled")) + } + } + _ => Ok(()), } } } @@ -557,28 +680,24 @@ fn sanitize_app_version(tag: &str) -> String { sanitized.replace(' ', "") } -fn validate_cloud_app(app: &RawAppManifest) -> Result<()> { - check_safe_app_name(&app.info.name)?; - ensure!(!app.components.is_empty(), "No components in spin.toml!"); - for component in &app.components { +fn validate_cloud_app(app: &DeployableApp) -> Result<()> { + check_safe_app_name(app.name()?)?; + ensure!(!app.components().is_empty(), "No components in spin.toml!"); + for component in app.components() { if let Some(invalid_store) = component - .wasm - .key_value_stores + .key_value_stores() .iter() - .flatten() .find(|store| *store != SPIN_DEFAULT_KV_STORE) { - bail!("Invalid store {invalid_store:?} for component {:?}. Cloud currently supports only the 'default' store.", component.id); + bail!("Invalid store {invalid_store:?} for component {:?}. Cloud currently supports only the 'default' store.", component.id()); } if let Some(invalid_db) = component - .wasm - .sqlite_databases + .sqlite_databases() .iter() - .flatten() .find(|db| *db != SPIN_DEFAULT_DATABASE) { - bail!("Invalid database {invalid_db:?} for component {:?}. Cloud currently supports only the 'default' SQLite databases.", component.id); + bail!("Invalid database {invalid_db:?} for component {:?}. Cloud currently supports only the 'default' SQLite databases.", component.id()); } } Ok(()) @@ -702,15 +821,6 @@ Other apps can use different labels to refer to the same database."# Ok(DatabaseSelection::New(name)) } -fn sqlite_labels_used(cfg: &config::RawAppManifestImpl) -> Vec { - cfg.components - .iter() - .cloned() - .filter_map(|c| c.wasm.sqlite_databases) - .flatten() - .collect() -} - // Loops through an app's manifest and creates databases. // Returns a list of database and label pairs that should be // linked to the app once it is created. @@ -796,6 +906,127 @@ async fn link_databases( Ok(()) } +#[derive(Clone)] +struct DeployableApp(spin_app::locked::LockedApp); + +struct DeployableComponent(spin_app::locked::LockedComponent); + +impl DeployableApp { + fn name(&self) -> anyhow::Result<&str> { + self.0 + .metadata + .get("name") + .ok_or(anyhow!("Application has no name"))? + .as_str() + .ok_or(anyhow!("Application name is not a string")) + } + + fn version(&self) -> anyhow::Result<&str> { + self.0 + .metadata + .get("version") + .ok_or(anyhow!("Application has no version"))? + .as_str() + .ok_or(anyhow!("Application version is not a string")) + } + + fn components(&self) -> Vec { + self.0 + .components + .iter() + .map(|c| DeployableComponent(c.clone())) + .collect() + } + + fn sqlite_databases(&self) -> Vec { + self.components() + .iter() + .flat_map(|c| c.sqlite_databases()) + .collect() + } + + fn http_routes(&self) -> (Option, Vec) { + let base = self + .0 + .metadata + .get("trigger") + .and_then(|v| v.get("base")) + .and_then(|v| v.as_str()) + .map(|s| s.to_owned()); + let routes = self + .0 + .triggers + .iter() + .filter_map(|t| self.http_route(t)) + .collect(); + (base, routes) + } + + fn http_route(&self, trigger: &spin_app::locked::LockedTrigger) -> Option { + if &trigger.trigger_type != "http" { + return None; + } + + let Some(id) = trigger + .trigger_config + .get("component") + .and_then(|v| v.as_str()) + else { + return None; + }; + + let description = self.component_description(id).map(|s| s.to_owned()); + let route = trigger.trigger_config.get("route").and_then(|v| v.as_str()); + route.map(|r| HttpRoute { + id: id.to_owned(), + description, + route_pattern: r.to_owned(), + }) + } + + fn component_description(&self, id: &str) -> Option<&str> { + self.0 + .components + .iter() + .find(|c| c.id == id) + .and_then(|c| c.metadata.get("description").and_then(|v| v.as_str())) + } +} + +#[derive(Debug)] +struct HttpRoute { + id: String, + description: Option, + route_pattern: String, +} + +impl DeployableComponent { + fn id(&self) -> &str { + &self.0.id + } + + fn key_value_stores(&self) -> Vec { + self.metadata_vec_string("key_value_stores") + } + + fn sqlite_databases(&self) -> Vec { + self.metadata_vec_string("databases") + } + + fn metadata_vec_string(&self, key: &str) -> Vec { + let Some(raw) = self.0.metadata.get(key) else { + return vec![]; + }; + let Some(arr) = raw.as_array() else { + return vec![]; + }; + arr.iter() + .filter_map(|v| v.as_str()) + .map(|s| s.to_owned()) + .collect() + } +} + fn random_buildinfo() -> BuildMetadata { let random_bytes: [u8; 4] = rand::thread_rng().gen(); let random_hex: String = random_bytes.iter().map(|b| format!("{:x}", b)).collect(); @@ -907,12 +1138,8 @@ async fn is_ready(app_info_url: &str, expected_version: &str) -> Result { Ok(true) } -fn print_available_routes( - app_base_url: &Url, - base: &str, - cfg: &spin_loader::local::config::RawAppManifest, -) { - if cfg.components.is_empty() { +fn print_available_routes(app_base_url: &Url, base: &str, routes: &[HttpRoute]) { + if routes.is_empty() { return; } @@ -921,13 +1148,11 @@ fn print_available_routes( let route_prefix = app_base_url.strip_suffix('/').unwrap_or(&app_base_url); println!("Available Routes:"); - for component in &cfg.components { - if let TriggerConfig::Http(http_cfg) = &component.trigger { - let route = RoutePattern::from(base, &http_cfg.route); - println!(" {}: {}{}", component.id, route_prefix, route); - if let Some(description) = &component.description { - println!(" {}", description); - } + for component in routes { + let route = RoutePattern::from(base, &component.route_pattern); + println!(" {}: {}{}", component.id, route_prefix, route); + if let Some(description) = &component.description { + println!(" {}", description); } } } diff --git a/src/opts.rs b/src/opts.rs index ae3f647..d322f9e 100644 --- a/src/opts.rs +++ b/src/opts.rs @@ -1,6 +1,8 @@ pub const DEFAULT_MANIFEST_FILE: &str = spin_common::paths::DEFAULT_MANIFEST_FILE; pub const APP_MANIFEST_FILE_OPT: &str = "APP_MANIFEST_FILE"; +pub const APPLICATION_OPT: &str = "APPLICATION"; pub const BUILDINFO_OPT: &str = "BUILDINFO"; +pub const FROM_REGISTRY_OPT: &str = "REGISTRY_REFERENCE"; pub const INSECURE_OPT: &str = "INSECURE"; pub const CLOUD_SERVER_URL_OPT: &str = "CLOUD_SERVER_URL"; pub const CLOUD_URL_ENV: &str = "CLOUD_URL";