diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 129086da..e2d56247 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,7 +17,23 @@ jobs: os: "ubuntu-latest", arch: "aarch64" } - shims: [slight, spin, wws, lunatic] + shims: + - { + name: "slight", + version: "v1", + } + - { + name: "spin", + version: "v2", + } + - { + name: "wws", + version: "v1", + } + - { + name: "lunatic", + version: "v1", + } env: ARCH: ${{ matrix.config.arch }} steps: @@ -25,17 +41,17 @@ jobs: - uses: Swatinem/rust-cache@v2 with: workspaces: | - "containerd-shim-*-v1 -> target" + "containerd-shim-* -> target" - name: "Install dependencies" run: | sudo apt-get update sudo apt-get install -y protobuf-compiler libseccomp-dev - - name: build ${{ matrix.shims }} + - name: build ${{ matrix.shims.name }} run: | - VERBOSE=1 make build SHIMS=${{ matrix.shims }} - - name: unit tests ${{ matrix.shims }} + VERBOSE=1 make build SHIMS=${{ matrix.shims.name }} + - name: unit tests ${{ matrix.shims.name }} run: | - VERBOSE=1 make unit-tests SHIMS=${{ matrix.shims }} + VERBOSE=1 make unit-tests SHIMS=${{ matrix.shims.name }} - name: lowercase the runner OS name shell: bash run: | @@ -44,12 +60,12 @@ jobs: - name: package release assets run: | mkdir _dist - cp containerd-shim-*-v1/target/${{ matrix.config.arch }}-unknown-linux-musl/release/containerd-shim-*-v1 _dist/ + cp containerd-shim-*/target/${{ matrix.config.arch }}-unknown-linux-musl/release/containerd-shim-*-${{ matrix.shims.version }} _dist/ cd _dist - tar czf containerd-wasm-shims-v1-${{ matrix.shims }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz containerd-shim-*-v1 + tar czf containerd-wasm-shims-${{ matrix.shims.version }}-${{ matrix.shims.name }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz containerd-shim-*-${{ matrix.shims.version }} - name: upload shim artifacts uses: actions/upload-artifact@v3 with: - name: containerd-wasm-shims-v1-${{ matrix.shims }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }} - path: _dist/containerd-wasm-shims-v1-${{ matrix.shims }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz + name: containerd-wasm-shims-${{ matrix.shims.version }}-${{ matrix.shims.name }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }} + path: _dist/containerd-wasm-shims-${{ matrix.shims.version }}-${{ matrix.shims.name }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz retention-days: 5 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d2fa89b7..0b746ef7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: workspaces: | - "containerd-shim-*-v1 -> target" + "containerd-shim-* -> target" - name: "Install dependencies" run: | sudo apt-get update @@ -37,7 +37,7 @@ jobs: - name: Extract containerd-wasm-shims-v1-linux-${{ env.ARCH }} run: | mkdir -p ./bin - for f in containerd-wasm-shims-v1-*-linux-${{ env.ARCH }}/containerd-wasm-shims-v1-*-linux-${{ env.ARCH }}.tar.gz + for f in containerd-wasm-shims-*-*-linux-${{ env.ARCH }}/containerd-wasm-shims-*-*-linux-${{ env.ARCH }}.tar.gz do tar -xzf "$f" -C ./bin done - name: install k3d diff --git a/Cargo.lock b/Cargo.lock index fc39b1bd..43ec825f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -762,9 +762,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.147" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libz-sys" diff --git a/Makefile b/Makefile index 8ed88273..5b389bc9 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ test: unit-tests integration-tests .PHONY: unit-tests unit-tests: build - $(foreach shim,$(SHIMS),cross test --release --manifest-path=containerd-shim-$(shim)-v1/Cargo.toml --target $(TARGET);) + $(foreach shim,$(SHIMS),cross test --release --manifest-path=containerd-shim-$(shim)/Cargo.toml --target $(TARGET);) .PHONY: check-bins check-bins: @@ -56,8 +56,8 @@ test/clean: .PHONY: fmt fmt: - $(foreach shim,$(SHIMS),cargo fmt --all --manifest-path=containerd-shim-$(shim)-v1/Cargo.toml -- --check;) - $(foreach shim,$(SHIMS),cargo clippy --all-targets --all-features --workspace --manifest-path=containerd-shim-$(shim)-v1/Cargo.toml -- -D warnings;) + $(foreach shim,$(SHIMS),cargo fmt --all --manifest-path=containerd-shim-$(shim)/Cargo.toml -- --check;) + $(foreach shim,$(SHIMS),cargo clippy --all-targets --all-features --workspace --manifest-path=containerd-shim-$(shim)/Cargo.toml -- -D warnings;) cargo fmt --all -- --check cargo clippy --all-targets --all-features --workspace -- --deny=warnings @@ -73,15 +73,15 @@ install-cross: .PHONY: $(BUILD_TARGETS) $(BUILD_TARGETS): SHIM = $(word 2,$(subst -, ,$@)) $(BUILD_TARGETS): install-cross - cross build --release --target $(TARGET) --manifest-path=containerd-shim-$(SHIM)-v1/Cargo.toml $(VERBOSE_FLAG) + cross build --release --target $(TARGET) --manifest-path=containerd-shim-$(SHIM)/Cargo.toml $(VERBOSE_FLAG) .PHONY: build-% build-%: - cargo build --release --manifest-path=containerd-shim-$*-v1/Cargo.toml + cargo build --release --manifest-path=containerd-shim-$*/Cargo.toml .PHONY: install install: $(foreach shim,$(SHIMS),build-$(shim)) - sudo $(INSTALL) containerd-shim-*/target/release/containerd-shim-*-v1 $(PREFIX)/bin + sudo $(INSTALL) containerd-shim-*/target/release/containerd-shim-* $(PREFIX)/bin .PHONY: update-deps update-deps: @@ -105,9 +105,9 @@ run_%: install load .PHONY: clean clean: $(addprefix clean-,$(SHIMS)) - $(foreach shim,$(SHIMS),test -f $(PREFIX)/bin/containerd-shim-$(shim)-v1 && sudo rm -rf $(PREFIX)/bin/containerd-shim-$(proj)-v1 || true;) + $(foreach shim,$(SHIMS),test -f $(PREFIX)/bin/containerd-shim-$(shim)-* && sudo rm -rf $(PREFIX)/bin/containerd-shim-$(proj)-* || true;) test -d ./test && sudo rm -rf ./test || true .PHONY: clean-% clean-%: - cargo clean --manifest-path containerd-shim-$*-v1/Cargo.toml \ No newline at end of file + cargo clean --manifest-path containerd-shim-$*/Cargo.toml \ No newline at end of file diff --git a/README.md b/README.md index 352c9932..33935705 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ As mentioned above, this project uses runwasi's `containerd-shim-wasm` to build ## Quickstarts - [Start k3d and run a sample WASM application](./deployments/k3d/README.md#how-to-run-the-example). -- [Create a Spin application on k3d](./containerd-shim-spin-v1/quickstart.md) +- [Create a Spin application on k3d](./containerd-shim-spin-v2/quickstart.md) - [Deploy a SpiderLightning application with k3d](./containerd-shim-slight-v1/quickstart.md) - [Deploy a Wasm Workers Server application with k3d](./containerd-shim-slight-v1/quickstart.md) @@ -53,12 +53,12 @@ In [the deployments directory](deployments) you will find examples of deploying To use one of these containerd shims in Kubernetes, you must do the following: -1. Install the shim binary somewhere on the path of your Kubernetes worker nodes. For example, copy `containerd-shim-spin-v1` to `/bin`. +1. Install the shim binary somewhere on the path of your Kubernetes worker nodes. For example, copy `containerd-shim-spin-v2` to `/bin`. 2. Add the following to the containerd config.toml that maps the runtime type to the shim binary from step 1. ```toml [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.spin] - runtime_type = "io.containerd.spin.v1" + runtime_type = "io.containerd.spin.v2" ``` 3. Apply a runtime class that contains a handler that matches the "spin" config runtime name from step 2. diff --git a/containerd-shim-lunatic-v1/Cargo.lock b/containerd-shim-lunatic/Cargo.lock similarity index 99% rename from containerd-shim-lunatic-v1/Cargo.lock rename to containerd-shim-lunatic/Cargo.lock index e8bc223c..368c28cc 100644 --- a/containerd-shim-lunatic-v1/Cargo.lock +++ b/containerd-shim-lunatic/Cargo.lock @@ -612,7 +612,7 @@ dependencies = [ [[package]] name = "containerd-shim-wasm" version = "0.4.0" -source = "git+https://github.com/containerd/runwasi?tag=containerd-shim-wasm/v0.4.0#5788ced8525a0d2831718f4a24d06fb4d5af6afb" +source = "git+https://github.com/containerd/runwasi?rev=c768e5b0919ca02903a301bf82a390489437dabe#c768e5b0919ca02903a301bf82a390489437dabe" dependencies = [ "anyhow", "caps", @@ -1765,9 +1765,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libcgroups" @@ -2450,9 +2450,9 @@ dependencies = [ [[package]] name = "oci-spec" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95e7c5a234613dd98d240891270925718736701c2dbce9c5587567133cf8220f" +checksum = "8384f8eff13954bafafba991f1910779020456f9694de25e81a13da5b7de6309" dependencies = [ "derive_builder", "getset", diff --git a/containerd-shim-lunatic-v1/Cargo.toml b/containerd-shim-lunatic/Cargo.toml similarity index 94% rename from containerd-shim-lunatic-v1/Cargo.toml rename to containerd-shim-lunatic/Cargo.toml index b929894e..78c2e47d 100644 --- a/containerd-shim-lunatic-v1/Cargo.toml +++ b/containerd-shim-lunatic/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", tag = "containerd-shim-wasm/v0.4.0" } +containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "c768e5b0919ca02903a301bf82a390489437dabe" } log = "~0.4" anyhow = "1.0.72" chrono = { version = "0.4.26", features = ["std"] } diff --git a/containerd-shim-lunatic-v1/Cross.toml b/containerd-shim-lunatic/Cross.toml similarity index 100% rename from containerd-shim-lunatic-v1/Cross.toml rename to containerd-shim-lunatic/Cross.toml diff --git a/containerd-shim-lunatic-v1/src/common.rs b/containerd-shim-lunatic/src/common.rs similarity index 100% rename from containerd-shim-lunatic-v1/src/common.rs rename to containerd-shim-lunatic/src/common.rs diff --git a/containerd-shim-lunatic-v1/src/engine.rs b/containerd-shim-lunatic/src/engine.rs similarity index 100% rename from containerd-shim-lunatic-v1/src/engine.rs rename to containerd-shim-lunatic/src/engine.rs diff --git a/containerd-shim-lunatic-v1/src/main.rs b/containerd-shim-lunatic/src/main.rs similarity index 86% rename from containerd-shim-lunatic-v1/src/main.rs rename to containerd-shim-lunatic/src/main.rs index 1b5f5271..92a1c808 100644 --- a/containerd-shim-lunatic-v1/src/main.rs +++ b/containerd-shim-lunatic/src/main.rs @@ -5,5 +5,5 @@ mod common; mod engine; fn main() { - shim_main::>("lunatic", version!(), revision!(), None); + shim_main::>("lunatic", version!(), revision!(), "v1", None); } diff --git a/containerd-shim-slight-v1/Cargo.lock b/containerd-shim-slight/Cargo.lock similarity index 99% rename from containerd-shim-slight-v1/Cargo.lock rename to containerd-shim-slight/Cargo.lock index cd291d73..d5bce05e 100644 --- a/containerd-shim-slight-v1/Cargo.lock +++ b/containerd-shim-slight/Cargo.lock @@ -1475,7 +1475,7 @@ dependencies = [ [[package]] name = "containerd-shim-wasm" version = "0.4.0" -source = "git+https://github.com/containerd/runwasi?tag=containerd-shim-wasm/v0.4.0#5788ced8525a0d2831718f4a24d06fb4d5af6afb" +source = "git+https://github.com/containerd/runwasi?rev=c768e5b0919ca02903a301bf82a390489437dabe#c768e5b0919ca02903a301bf82a390489437dabe" dependencies = [ "anyhow", "caps", @@ -3039,9 +3039,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libcgroups" @@ -3538,9 +3538,9 @@ dependencies = [ [[package]] name = "oci-spec" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95e7c5a234613dd98d240891270925718736701c2dbce9c5587567133cf8220f" +checksum = "8384f8eff13954bafafba991f1910779020456f9694de25e81a13da5b7de6309" dependencies = [ "derive_builder", "getset", diff --git a/containerd-shim-slight-v1/Cargo.toml b/containerd-shim-slight/Cargo.toml similarity index 92% rename from containerd-shim-slight-v1/Cargo.toml rename to containerd-shim-slight/Cargo.toml index 8a261592..b4c74f6a 100644 --- a/containerd-shim-slight-v1/Cargo.toml +++ b/containerd-shim-slight/Cargo.toml @@ -11,7 +11,7 @@ Containerd shim for running Slight workloads. """ [dependencies] -containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", tag = "containerd-shim-wasm/v0.4.0" } +containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "c768e5b0919ca02903a301bf82a390489437dabe" } log = "0.4" tokio = { version = "1", features = [ "full" ] } slight = { git = "https://github.com/deislabs/spiderlightning", version = "0.5.1" } diff --git a/containerd-shim-slight-v1/Cross.toml b/containerd-shim-slight/Cross.toml similarity index 100% rename from containerd-shim-slight-v1/Cross.toml rename to containerd-shim-slight/Cross.toml diff --git a/containerd-shim-slight-v1/quickstart.md b/containerd-shim-slight/quickstart.md similarity index 100% rename from containerd-shim-slight-v1/quickstart.md rename to containerd-shim-slight/quickstart.md diff --git a/containerd-shim-slight-v1/readme.md b/containerd-shim-slight/readme.md similarity index 100% rename from containerd-shim-slight-v1/readme.md rename to containerd-shim-slight/readme.md diff --git a/containerd-shim-slight-v1/src/engine.rs b/containerd-shim-slight/src/engine.rs similarity index 100% rename from containerd-shim-slight-v1/src/engine.rs rename to containerd-shim-slight/src/engine.rs diff --git a/containerd-shim-slight-v1/src/main.rs b/containerd-shim-slight/src/main.rs similarity index 86% rename from containerd-shim-slight-v1/src/main.rs rename to containerd-shim-slight/src/main.rs index e34ae1e9..2cbc338a 100644 --- a/containerd-shim-slight-v1/src/main.rs +++ b/containerd-shim-slight/src/main.rs @@ -4,5 +4,5 @@ use containerd_shim_wasm::sandbox::cli::{revision, shim_main, version}; mod engine; fn main() { - shim_main::>("slight", version!(), revision!(), None); + shim_main::>("slight", version!(), revision!(), "v1", None); } diff --git a/containerd-shim-spin-v1/src/engine.rs b/containerd-shim-spin-v1/src/engine.rs deleted file mode 100644 index 137f66ef..00000000 --- a/containerd-shim-spin-v1/src/engine.rs +++ /dev/null @@ -1,155 +0,0 @@ -use anyhow::{anyhow, Context, Result}; -use spin_trigger::TriggerHooks; -use std::net::SocketAddr; -use std::net::ToSocketAddrs; -use std::path::PathBuf; - -use containerd_shim_wasm::container::{Engine, RuntimeContext, Stdio}; -use log::info; -use spin_manifest::Application; -use spin_redis_engine::RedisTrigger; -use spin_trigger::{loader, RuntimeConfig, TriggerExecutor, TriggerExecutorBuilder}; -use spin_trigger_http::HttpTrigger; -use tokio::runtime::Runtime; -use url::Url; -use wasmtime::OptLevel; - -const SPIN_ADDR: &str = "0.0.0.0:80"; - -#[derive(Clone, Default)] -pub struct SpinEngine; - -struct StdioTriggerHook; -impl TriggerHooks for StdioTriggerHook { - fn app_loaded(&mut self, _app: &spin_app::App, _runtime_config: &RuntimeConfig) -> Result<()> { - Ok(()) - } - - fn component_store_builder( - &self, - _component: &spin_app::AppComponent, - builder: &mut spin_core::StoreBuilder, - ) -> Result<()> { - builder.inherit_stdout(); - builder.inherit_stderr(); - Ok(()) - } -} - -impl SpinEngine { - async fn build_spin_application( - mod_path: PathBuf, - working_dir: PathBuf, - ) -> anyhow::Result { - spin_loader::from_file(mod_path, Some(working_dir)).await - } - - async fn build_spin_trigger( - working_dir: PathBuf, - app: Application, - ) -> Result - where - for<'de> ::TriggerConfig: serde::de::Deserialize<'de>, - { - // Build and write app lock file - let locked_app = spin_trigger::locked::build_locked_app(app, &working_dir)?; - let locked_path = working_dir.join("spin.lock"); - let locked_app_contents = - serde_json::to_vec_pretty(&locked_app).expect("could not serialize locked app"); - std::fs::write(&locked_path, locked_app_contents).expect("could not write locked app"); - let locked_url = Url::from_file_path(&locked_path) - .map_err(|_| anyhow!("cannot convert to file URL: {locked_path:?}"))? - .to_string(); - - // Build trigger config - let loader = loader::TriggerLoader::new(working_dir.clone(), true); - let runtime_config = RuntimeConfig::new(PathBuf::from("/").into()); - let mut builder = TriggerExecutorBuilder::new(loader); - builder - .hooks(StdioTriggerHook{}) - .config_mut() - .wasmtime_config() - .cranelift_opt_level(OptLevel::Speed); - let init_data = Default::default(); - let executor = builder.build(locked_url, runtime_config, init_data).await?; - Ok(executor) - } - - async fn wasm_exec_async(&self) -> Result<()> { - info!(" >>> building spin application"); - let app = - SpinEngine::build_spin_application(PathBuf::from("/spin.toml"), PathBuf::from("/")) - .await - .context("failed to build spin application")?; - - let trigger = app.info.trigger.clone(); - info!(" >>> building spin trigger {:?}", trigger); - - let f = match trigger { - spin_manifest::ApplicationTrigger::Http(_config) => { - let http_trigger: HttpTrigger = - SpinEngine::build_spin_trigger(PathBuf::from("/"), app) - .await - .context("failed to build spin trigger")?; - info!(" >>> running spin trigger"); - http_trigger.run(spin_trigger_http::CliArgs { - address: parse_addr(SPIN_ADDR).unwrap(), - tls_cert: None, - tls_key: None, - }) - } - spin_manifest::ApplicationTrigger::Redis(_config) => { - let redis_trigger: RedisTrigger = - SpinEngine::build_spin_trigger(PathBuf::from("/"), app) - .await - .context("failed to build spin trigger")?; - - info!(" >>> running spin trigger"); - redis_trigger.run(spin_trigger::cli::NoArgs) - } - _ => todo!("Only Http and Redis triggers are currently supported."), - }; - - info!(" >>> notifying main thread we are about to start"); - f.await - } -} - -impl Engine for SpinEngine { - fn name() -> &'static str { - "spin" - } - - fn run_wasi(&self, _ctx: &impl RuntimeContext, stdio: Stdio) -> Result { - info!("setting up wasi"); - stdio.redirect()?; - let rt = Runtime::new().context("failed to create runtime")?; - - rt.block_on(self.wasm_exec_async())?; - Ok(0) - } - - fn can_handle(&self, _ctx: &impl RuntimeContext) -> Result<()> { - Ok(()) - } -} - -fn parse_addr(addr: &str) -> Result { - let addrs: SocketAddr = addr - .to_socket_addrs()? - .next() - .ok_or_else(|| anyhow!("could not parse address: {}", addr))?; - Ok(addrs) -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn can_parse_spin_address() { - let parsed = parse_addr(SPIN_ADDR).unwrap(); - assert_eq!(parsed.clone().port(), 80); - assert_eq!(parsed.ip().to_string(), "0.0.0.0"); - } -} diff --git a/containerd-shim-spin-v1/Cargo.lock b/containerd-shim-spin/Cargo.lock similarity index 84% rename from containerd-shim-spin-v1/Cargo.lock rename to containerd-shim-spin/Cargo.lock index d2bb8c4c..dec27403 100644 --- a/containerd-shim-spin-v1/Cargo.lock +++ b/containerd-shim-spin/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]] @@ -26,6 +17,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler32" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" + [[package]] name = "aes" version = "0.8.3" @@ -33,26 +30,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if 1.0.0", - "cipher 0.4.4", + "cipher", "cpufeatures", ] [[package]] name = "ahash" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" -dependencies = [ - "getrandom 0.2.10", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7d5a2cecb58716e47d67d5703a249964b14c7be1ec3cad3affc295b2d1c35d" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if 1.0.0", "once_cell", @@ -112,102 +98,246 @@ dependencies = [ ] [[package]] -name = "anstream" -version = "0.6.4" +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "d37875bd9915b7d67c2f117ea2c30a0989874d0b2cb694fe25403c85763c0c9e" dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", + "concurrent-queue", + "event-listener 3.0.1", + "event-listener-strategy", + "futures-core", + "pin-project-lite", ] [[package]] -name = "anstyle" -version = "1.0.4" +name = "async-compression" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "f658e2baef915ba0f26f1f7c42bfb8e12f532a01f449a090ded75ae7a07e9ba2" +dependencies = [ + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] [[package]] -name = "anstyle-parse" -version = "0.2.2" +name = "async-executor" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" dependencies = [ - "utf8parse", + "async-lock 2.8.0", + "async-task", + "concurrent-queue", + "fastrand 2.0.1", + "futures-lite 1.13.0", + "slab", ] [[package]] -name = "anstyle-query" -version = "1.0.0" +name = "async-global-executor" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" dependencies = [ - "windows-sys 0.48.0", + "async-channel 1.9.0", + "async-executor", + "async-io 1.13.0", + "async-lock 2.8.0", + "blocking", + "futures-lite 1.13.0", + "once_cell", ] [[package]] -name = "anstyle-wincon" -version = "3.0.1" +name = "async-io" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "anstyle", + "async-lock 2.8.0", + "autocfg", + "cfg-if 1.0.0", + "concurrent-queue", + "futures-lite 1.13.0", + "log", + "parking", + "polling 2.8.0", + "rustix 0.37.27", + "slab", + "socket2 0.4.10", + "waker-fn", +] + +[[package]] +name = "async-io" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997" +dependencies = [ + "async-lock 3.0.0", + "cfg-if 1.0.0", + "concurrent-queue", + "futures-io", + "futures-lite 2.0.1", + "parking", + "polling 3.3.0", + "rustix 0.38.21", + "slab", + "tracing", + "waker-fn", "windows-sys 0.48.0", ] [[package]] -name = "anyhow" -version = "1.0.75" +name = "async-lock" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] [[package]] -name = "arbitrary" -version = "1.3.1" +name = "async-lock" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2e1373abdaa212b704512ec2bd8b26bd0b7d5c3f70117411a5d9a451383c859" +checksum = "45e900cdcd39bb94a14487d3f7ef92ca222162e6c7c3fe7cb3550ea75fb486ed" +dependencies = [ + "event-listener 3.0.1", + "event-listener-strategy", + "pin-project-lite", +] [[package]] -name = "async-channel" -version = "1.9.0" +name = "async-process" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" dependencies = [ - "concurrent-queue", - "event-listener", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", + "blocking", + "cfg-if 1.0.0", + "event-listener 3.0.1", + "futures-lite 1.13.0", + "rustix 0.38.21", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io 2.2.0", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if 1.0.0", "futures-core", + "futures-io", + "rustix 0.38.21", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", ] [[package]] -name = "async-compression" -version = "0.3.15" +name = "async-std" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" +checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ - "flate2", + "async-channel 1.9.0", + "async-global-executor", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-process", + "crossbeam-utils", + "futures-channel", "futures-core", + "futures-io", + "futures-lite 1.13.0", + "gloo-timers", + "kv-log-macro", + "log", "memchr", + "once_cell", "pin-project-lite", - "tokio", + "pin-utils", + "slab", + "wasm-bindgen-futures", ] [[package]] -name = "async-compression" -version = "0.4.4" +name = "async-stream" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f658e2baef915ba0f26f1f7c42bfb8e12f532a01f449a090ded75ae7a07e9ba2" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ - "flate2", + "async-stream-impl", "futures-core", - "memchr", "pin-project-lite", - "tokio", ] +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "async-tar" +version = "0.4.2" +source = "git+https://github.com/vdice/async-tar?rev=71e037f9652971e7a55b412a8e47a37b06f9c29d#71e037f9652971e7a55b412a8e47a37b06f9c29d" +dependencies = [ + "async-std", + "filetime", + "libc", + "pin-project", + "redox_syscall 0.2.16", + "xattr 0.2.3", +] + +[[package]] +name = "async-task" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" + [[package]] name = "async-trait" version = "0.1.74" @@ -216,9 +346,15 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "atty" version = "0.2.14" @@ -248,8 +384,8 @@ dependencies = [ "bytes", "futures-util", "http", - "http-body", - "hyper", + "http-body 0.4.5", + "hyper 0.14.27", "itoa", "matchit", "memchr", @@ -274,7 +410,7 @@ dependencies = [ "bytes", "futures-util", "http", - "http-body", + "http-body 0.4.5", "mime", "rustversion", "tower-layer", @@ -321,7 +457,7 @@ dependencies = [ "log", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "thiserror", "time", "url", @@ -334,15 +470,24 @@ 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 1.0.0", "libc", "miniz_oxide", - "object 0.32.1", + "object", "rustc-demangle", ] +[[package]] +name = "base64" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +dependencies = [ + "byteorder", +] + [[package]] name = "base64" version = "0.13.1" @@ -361,17 +506,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bcrypt" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f691e63585950d8c1c43644d11bab9073e40f5060dd2822734ae7c3dc69a3a80" -dependencies = [ - "base64 0.13.1", - "blowfish", - "getrandom 0.2.10", -] - [[package]] name = "bincode" version = "1.3.3" @@ -383,9 +517,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.68.1" +version = "0.69.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" +checksum = "9ffcebc3849946a7170a05992aac39da343a90676ab392c51a4280981d6379c2" dependencies = [ "bitflags 2.4.1", "cexpr", @@ -398,49 +532,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.38", -] - -[[package]] -name = "bindle" -version = "0.8.0" -source = "git+https://github.com/fermyon/bindle?tag=v0.8.2#84ea1dd86fab6ffe27235e268f47f632421db8f9" -dependencies = [ - "anyhow", - "async-compression 0.3.15", - "async-trait", - "base64 0.13.1", - "bcrypt", - "bytes", - "dirs 4.0.0", - "ed25519-dalek", - "either", - "futures", - "hyper", - "jsonwebtoken", - "lru 0.7.8", - "mime", - "mime_guess", - "oauth2", - "rand 0.7.3", - "reqwest", - "semver", - "serde", - "serde_cbor", - "serde_json", - "sha2 0.10.8", - "sled", - "tempfile", - "thiserror", - "time", - "tokio", - "tokio-stream", - "tokio-tar", - "tokio-util 0.6.10", - "toml", - "tracing", - "tracing-futures", - "url", + "syn 2.0.39", ] [[package]] @@ -467,15 +559,6 @@ dependencies = [ "wyz", ] -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -486,14 +569,19 @@ dependencies = [ ] [[package]] -name = "blowfish" -version = "0.8.0" +name = "blocking" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe3ff3fc1de48c1ac2e3341c4df38b0d1bfb8fdf04632a187c8b75aaa319a7ab" +checksum = "864b30e660d766b7e9b47347d9b6558a17f1cfa22274034fa6f55b274b3e4620" dependencies = [ - "byteorder", - "cipher 0.3.0", - "opaque-debug", + "async-channel 2.1.0", + "async-lock 3.0.0", + "async-task", + "fastrand 2.0.1", + "futures-io", + "futures-lite 2.0.1", + "piper", + "tracing", ] [[package]] @@ -556,13 +644,13 @@ dependencies = [ "flate2", "fs2", "glob", - "indicatif 0.16.2", + "indicatif", "log", "rand 0.8.5", "reqwest", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "tar", "tempfile", "thiserror", @@ -570,191 +658,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.21", + "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.26", + "rustix 0.38.21", "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", @@ -762,26 +710,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.26", + "io-lifetimes 2.0.2", + "rustix 0.38.21", ] [[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.26", - "winx 0.35.1", + "rustix 0.38.21", + "winx", ] [[package]] @@ -853,15 +801,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array", -] - [[package]] name = "cipher" version = "0.4.4" @@ -891,8 +830,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", @@ -900,28 +839,6 @@ dependencies = [ "textwrap", ] -[[package]] -name = "clap" -version = "4.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" -dependencies = [ - "clap_builder", - "clap_derive 4.4.2", -] - -[[package]] -name = "clap_builder" -version = "4.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" -dependencies = [ - "anstream", - "anstyle", - "clap_lex 0.5.1", - "strsim", -] - [[package]] name = "clap_derive" version = "3.2.25" @@ -935,18 +852,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.38", -] - [[package]] name = "clap_lex" version = "0.2.4" @@ -956,12 +861,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 = "cmake" version = "0.1.50" @@ -971,12 +870,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" @@ -988,16 +881,16 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "tokio-util 0.7.9", + "tokio-util 0.7.10", ] [[package]] name = "command-fds" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35cc819120a403d0eb3d0c404088c5a9f9b06066147ec69a21919fbc0833ef68" +checksum = "f190f3c954f7bca3c6296d0ec561c739bdbe6c7e990294ed168d415f6e1b5b01" dependencies = [ - "nix 0.22.3", + "nix 0.27.1", "thiserror", ] @@ -1019,7 +912,6 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", - "unicode-width", "windows-sys 0.45.0", ] @@ -1082,7 +974,7 @@ dependencies = [ ] [[package]] -name = "containerd-shim-spin-v1" +name = "containerd-shim-spin-v2" version = "0.9.2" dependencies = [ "anyhow", @@ -1092,9 +984,11 @@ dependencies = [ "serde", "serde_json", "spin-app", + "spin-common", "spin-core", "spin-loader", "spin-manifest", + "spin-oci", "spin-redis-engine", "spin-trigger", "spin-trigger-http", @@ -1106,7 +1000,7 @@ dependencies = [ [[package]] name = "containerd-shim-wasm" version = "0.4.0" -source = "git+https://github.com/containerd/runwasi?tag=containerd-shim-wasm/v0.4.0#5788ced8525a0d2831718f4a24d06fb4d5af6afb" +source = "git+https://github.com/containerd/runwasi?rev=c768e5b0919ca02903a301bf82a390489437dabe#c768e5b0919ca02903a301bf82a390489437dabe" dependencies = [ "anyhow", "caps", @@ -1159,27 +1053,27 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbc60abd742b35f2492f808e1abbb83d45f72db402e14c55057edc9c7b1e9e4" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.97.2" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aae6f552c4c0ccfb30b9559b77bc985a387d998e1736cbbe6b14c903f3656cf" +checksum = "2b5bb9245ec7dcc04d03110e538d31f0969d301c9d673145f4b4d5c3478539a3" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.97.2" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95551de96900cefae691ce895ff2abc691ae3a0b97911a76b45faf99e432937b" +checksum = "ebb18d10e5ddac43ba4ca8fd4e310938569c3e484cc01b6372b27dc5bb4dfd28" dependencies = [ "bumpalo", "cranelift-bforest", @@ -1188,8 +1082,8 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli 0.27.3", - "hashbrown 0.13.2", + "gimli", + "hashbrown 0.14.2", "log", "regalloc2", "smallvec", @@ -1198,42 +1092,43 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.97.2" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a3ad7b2bb03de3383f258b00ca29d80234bebd5130cb6ef3bae37ada5baab0" +checksum = "7a3ce6d22982c1b9b6b012654258bab1a13947bb12703518bef06b1a4867c3d6" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.97.2" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915918fee4142c85fb04bafe0bcd697e2fd6c15a260301ea6f8d2ea332a30e86" +checksum = "47220fd4f9a0ce23541652b6f16f83868d282602c600d14934b2a4c166b4bd80" [[package]] name = "cranelift-control" -version = "0.97.2" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e447d548cd7f4fcb87fbd10edbd66a4f77966d17785ed50a08c8f3835483c8" +checksum = "ed5a4c42672aea9b6e820046b52e47a1c05d3394a6cdf4cb3c3c4b702f954bd2" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.97.2" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d8ab3352a1e5966968d7ab424bd3de8e6b58314760745c3817c2eec3fa2f918" +checksum = "0b4e9a3296fc827f9d35135dc2c0c8dd8d8359eb1ef904bae2d55d5bcb0c9f94" dependencies = [ "serde", + "serde_derive", ] [[package]] name = "cranelift-frontend" -version = "0.97.2" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bffa38431f7554aa1594f122263b87c9e04abc55c9f42b81d37342ac44f79f0" +checksum = "33ec537d0f0b8e084517f3e7bfa1d89af343d7c7df455573fca9f272d4e01267" dependencies = [ "cranelift-codegen", "log", @@ -1243,15 +1138,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.97.2" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84cef66a71c77938148b72bf006892c89d6be9274a08f7e669ff15a56145d701" +checksum = "45bab6d69919d210a50331d35cc6ce111567bc040aebac63a8ae130d0400a075" [[package]] name = "cranelift-native" -version = "0.97.2" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f33c7e5eb446e162d2d10b17fe68e1f091020cc2e4e38b5501c21099600b0a1b" +checksum = "f32e81605f352cf37af5463f11cd7deec7b6572741931a8d372f7fdd4a744f5d" dependencies = [ "cranelift-codegen", "libc", @@ -1260,9 +1155,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.97.2" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f7b64fa6a8c5b980eb6a17ef22089e15cb9f779f1ed3bd3072beab0686c09" +checksum = "0edaa4cbec1bc787395c074233df2652dd62f3e29d3ee60329514a0a51e6b045" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1270,7 +1165,7 @@ dependencies = [ "itertools 0.10.5", "log", "smallvec", - "wasmparser 0.107.0", + "wasmparser 0.115.0", "wasmtime-types", ] @@ -1376,19 +1271,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "curve25519-dalek" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "darling" version = "0.14.4" @@ -1527,22 +1409,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "crypto-common", "subtle", ] @@ -1609,6 +1482,45 @@ dependencies = [ "winapi", ] +[[package]] +name = "dkregistry" +version = "0.5.1-alpha.0" +source = "git+https://github.com/camallo/dkregistry-rs?rev=37acecb4b8139dd1b1cc83795442f94f90e1ffc5#37acecb4b8139dd1b1cc83795442f94f90e1ffc5" +dependencies = [ + "async-stream", + "base64 0.13.1", + "bytes", + "futures", + "http", + "libflate", + "log", + "mime", + "pin-project", + "regex", + "reqwest", + "serde", + "serde_ignored", + "serde_json", + "sha2", + "strum", + "strum_macros", + "tar", + "thiserror", + "tokio", + "url", +] + +[[package]] +name = "docker_credential" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f2821ba7f89de240e70f4af347ba5260512d0799a53556c10750805bad7c7fc" +dependencies = [ + "base64 0.10.1", + "serde", + "serde_json", +] + [[package]] name = "dotenvy" version = "0.15.7" @@ -1623,42 +1535,9 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "dyn-clone" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" - -[[package]] -name = "dyn-stack" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe7f8d7bcc523381d3c437b82cf74805de3931de0da69309ae0fe1bdf7a256e" -dependencies = [ - "bytemuck", - "reborrow", -] - -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", -] +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "either" @@ -1681,19 +1560,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[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" @@ -1715,9 +1581,6 @@ name = "esaxx-rs" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d817e038c30374a4bcb22f94d0a8a0e216958d4c3dcde369b1439fec4bdda6e6" -dependencies = [ - "cc", -] [[package]] name = "event-listener" @@ -1725,12 +1588,39 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cec0252c2afff729ee6f00e903d479fba81784c8e2bd77447673471fdfaea1" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" +dependencies = [ + "event-listener 3.0.1", + "pin-project-lite", +] + [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + [[package]] name = "fallible-streaming-iterator" version = "0.1.9" @@ -1759,20 +1649,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b0377f1edc77dbd1118507bc7a66e4ab64d2b90c66f90726dc801e73a8c68f9" dependencies = [ "cfg-if 1.0.0", - "rustix 0.38.20", + "rustix 0.38.21", "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" @@ -1845,12 +1725,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.20", + "io-lifetimes 2.0.2", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -1934,6 +1814,16 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +dependencies = [ + "futures-core", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.29" @@ -1942,7 +1832,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2049,7 +1939,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", ] @@ -2063,21 +1953,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", - "indexmap 1.9.3", + "fallible-iterator 0.3.0", + "indexmap 2.1.0", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" - [[package]] name = "git-version" version = "0.3.5" @@ -2106,6 +1990,18 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "go-flag" version = "0.1.0" @@ -2130,16 +2026,10 @@ dependencies = [ "indexmap 1.9.3", "slab", "tokio", - "tokio-util 0.7.9", + "tokio-util 0.7.10", "tracing", ] -[[package]] -name = "half" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" - [[package]] name = "half" version = "2.3.1" @@ -2148,9 +2038,6 @@ checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" dependencies = [ "cfg-if 1.0.0", "crunchy", - "num-traits", - "rand 0.8.5", - "rand_distr", ] [[package]] @@ -2158,9 +2045,6 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.7", -] [[package]] name = "hashbrown" @@ -2168,7 +2052,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.5", + "ahash", ] [[package]] @@ -2177,7 +2061,7 @@ version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" dependencies = [ - "ahash 0.8.5", + "ahash", "allocator-api2", ] @@ -2232,7 +2116,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -2267,6 +2151,15 @@ dependencies = [ "itoa", ] +[[package]] +name = "http-auth" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5430cacd7a1f9a02fbeb350dfc81a0e5ed42d81f3398cb0ba184017f85bdcfbc" +dependencies = [ + "memchr", +] + [[package]] name = "http-body" version = "0.4.5" @@ -2278,6 +2171,29 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "http-body" +version = "1.0.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "951dfc2e32ac02d67c90c0d65bd27009a635dc9b381a2cc7d284ab01e3a0150d" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92445bc9cc14bfa0a3ce56817dc3b5bcc227a168781a356b702410789cec0d10" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body 1.0.0-rc.2", + "pin-project-lite", +] + [[package]] name = "http-types" version = "2.12.0" @@ -2285,9 +2201,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" dependencies = [ "anyhow", - "async-channel", + "async-channel 1.9.0", "base64 0.13.1", - "futures-lite", + "futures-lite 1.13.0", "infer", "pin-project-lite", "rand 0.7.3", @@ -2311,16 +2227,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] -name = "humantime" -version = "2.1.0" +name = "hyper" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body 0.4.5", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.4.10", + "tokio", + "tower-service", + "tracing", + "want", +] [[package]] name = "hyper" -version = "0.14.27" +version = "1.0.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "7b75264b2003a3913f118d35c586e535293b3e22e41f074930762929d071e092" dependencies = [ "bytes", "futures-channel", @@ -2328,28 +2262,26 @@ dependencies = [ "futures-util", "h2", "http", - "http-body", + "http-body 1.0.0-rc.2", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", "tokio", - "tower-service", "tracing", "want", ] [[package]] name = "hyper-rustls" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http", - "hyper", - "rustls 0.21.7", + "hyper 0.14.27", + "rustls 0.21.8", "tokio", "tokio-rustls 0.24.1", ] @@ -2360,7 +2292,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper", + "hyper 0.14.27", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -2373,7 +2305,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.27", "native-tls", "tokio", "tokio-native-tls", @@ -2437,24 +2369,13 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", "hashbrown 0.14.2", -] - -[[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", + "serde", ] [[package]] @@ -2465,7 +2386,7 @@ checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" dependencies = [ "console", "lazy_static", - "number_prefix 0.4.0", + "number_prefix", "regex", ] @@ -2495,11 +2416,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", ] @@ -2526,17 +2447,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi 0.3.3", - "rustix 0.38.20", - "windows-sys 0.48.0", -] - [[package]] name = "itertools" version = "0.8.2" @@ -2610,25 +2520,35 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] [[package]] -name = "jsonwebtoken" -version = "8.3.0" +name = "jwt" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +checksum = "6204285f77fe7d9784db3fdc449ecce1a0114927a51d5a41c4c7a292011c015f" dependencies = [ - "base64 0.21.5", - "pem 1.1.1", - "ring 0.16.20", + "base64 0.13.1", + "crypto-common", + "digest", + "hmac", "serde", "serde_json", - "simple_asn1", + "sha2", +] + +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", ] [[package]] @@ -2724,9 +2644,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.149" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libcgroups" @@ -2781,6 +2701,26 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "libflate" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ff4ae71b685bbad2f2f391fe74f6b7659a34871c08b210fdc039e43bee07d18" +dependencies = [ + "adler32", + "crc32fast", + "libflate_lz77", +] + +[[package]] +name = "libflate_lz77" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a52d3a8bfc85f250440e4424db7d857e241a3aebbbe301f3eb606ab15c39acbf" +dependencies = [ + "rle-decode-fast", +] + [[package]] name = "libloading" version = "0.7.4" @@ -2792,10 +2732,15 @@ dependencies = [ ] [[package]] -name = "libm" -version = "0.2.8" +name = "libredox" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] [[package]] name = "libseccomp" @@ -2823,7 +2768,7 @@ checksum = "9ad36885b1e43534f5015a8c45a0be4e8a6e9a829bbb3c5704a1c5e0c0fad848" dependencies = [ "anyhow", "base64 0.21.5", - "fallible-iterator", + "fallible-iterator 0.2.0", "futures", "hrana-client-proto", "num-traits", @@ -2870,7 +2815,12 @@ version = "0.2.0-dev" source = "git+https://github.com/rustformers/llm?rev=2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663#2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663" dependencies = [ "llm-base", + "llm-bloom", + "llm-gpt2", + "llm-gptj", + "llm-gptneox", "llm-llama", + "llm-mpt", "serde", "tracing", ] @@ -2882,9 +2832,9 @@ source = "git+https://github.com/rustformers/llm?rev=2f6ffd4435799ceaa1d1bcb5a87 dependencies = [ "bytemuck", "ggml", - "half 2.3.1", + "half", "llm-samplers", - "memmap2 0.5.10", + "memmap2", "partial_sort", "rand 0.8.5", "regex", @@ -2895,6 +2845,39 @@ dependencies = [ "tracing", ] +[[package]] +name = "llm-bloom" +version = "0.2.0-dev" +source = "git+https://github.com/rustformers/llm?rev=2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663#2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663" +dependencies = [ + "llm-base", +] + +[[package]] +name = "llm-gpt2" +version = "0.2.0-dev" +source = "git+https://github.com/rustformers/llm?rev=2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663#2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663" +dependencies = [ + "bytemuck", + "llm-base", +] + +[[package]] +name = "llm-gptj" +version = "0.2.0-dev" +source = "git+https://github.com/rustformers/llm?rev=2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663#2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663" +dependencies = [ + "llm-base", +] + +[[package]] +name = "llm-gptneox" +version = "0.2.0-dev" +source = "git+https://github.com/rustformers/llm?rev=2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663#2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663" +dependencies = [ + "llm-base", +] + [[package]] name = "llm-llama" version = "0.2.0-dev" @@ -2904,6 +2887,14 @@ dependencies = [ "tracing", ] +[[package]] +name = "llm-mpt" +version = "0.2.0-dev" +source = "git+https://github.com/rustformers/llm?rev=2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663#2f6ffd4435799ceaa1d1bcb5a8790e5b3e0c5663" +dependencies = [ + "llm-base", +] + [[package]] name = "llm-samplers" version = "0.0.6" @@ -2935,15 +2926,6 @@ dependencies = [ "value-bag", ] -[[package]] -name = "lru" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" -dependencies = [ - "hashbrown 0.12.3", -] - [[package]] name = "lru" version = "0.9.0" @@ -3006,7 +2988,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ "cfg-if 1.0.0", - "digest 0.10.7", + "digest", ] [[package]] @@ -3021,7 +3003,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.20", + "rustix 0.38.21", ] [[package]] @@ -3033,24 +3015,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.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.7.1" @@ -3060,15 +3024,6 @@ dependencies = [ "autocfg", ] -[[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" @@ -3139,7 +3094,7 @@ checksum = "371717c0a5543d6a800cac822eac735aa7d2d2fbb41002e9856a4089532dbdce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3166,7 +3121,7 @@ dependencies = [ "mysql_common", "native-tls", "once_cell", - "pem 2.0.1", + "pem", "percent-encoding", "pin-project", "priority-queue", @@ -3176,7 +3131,7 @@ dependencies = [ "thiserror", "tokio", "tokio-native-tls", - "tokio-util 0.7.9", + "tokio-util 0.7.10", "twox-hash", "url", ] @@ -3207,7 +3162,7 @@ dependencies = [ "serde", "serde_json", "sha1 0.10.6", - "sha2 0.10.8", + "sha2", "smallvec", "subprocess", "thiserror", @@ -3232,19 +3187,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "nix" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" -dependencies = [ - "bitflags 1.3.2", - "cc", - "cfg-if 1.0.0", - "libc", - "memoffset 0.6.5", -] - [[package]] name = "nix" version = "0.25.1" @@ -3303,15 +3245,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" @@ -3329,7 +3262,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", - "libm", ] [[package]] @@ -3351,64 +3283,53 @@ 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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" -[[package]] -name = "oauth2" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c38841cdd844847e3e7c8d29cef9dcfed8877f8f56f9071f77843ecf3baf937f" -dependencies = [ - "base64 0.13.1", - "chrono", - "getrandom 0.2.10", - "http", - "rand 0.8.5", - "reqwest", - "serde", - "serde_json", - "serde_path_to_error", - "sha2 0.10.8", - "thiserror", - "url", -] - [[package]] name = "object" -version = "0.30.4" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "crc32fast", - "hashbrown 0.13.2", - "indexmap 1.9.3", + "hashbrown 0.14.2", + "indexmap 2.1.0", "memchr", ] [[package]] -name = "object" -version = "0.32.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +name = "oci-distribution" +version = "0.10.0" +source = "git+https://github.com/fermyon/oci-distribution?rev=63cbb0925775e0c9c870195cad1d50ac8707a264#63cbb0925775e0c9c870195cad1d50ac8707a264" dependencies = [ - "memchr", + "bytes", + "chrono", + "futures-util", + "http", + "http-auth", + "jwt", + "lazy_static", + "olpc-cjson", + "regex", + "reqwest", + "serde", + "serde_json", + "sha2", + "thiserror", + "tokio", + "tracing", + "unicase", ] [[package]] name = "oci-spec" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95e7c5a234613dd98d240891270925718736701c2dbce9c5587567133cf8220f" +checksum = "8384f8eff13954bafafba991f1910779020456f9694de25e81a13da5b7de6309" dependencies = [ "derive_builder 0.12.0", "getset", @@ -3417,6 +3338,17 @@ dependencies = [ "thiserror", ] +[[package]] +name = "olpc-cjson" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d637c9c15b639ccff597da8f4fa968300651ad2f1e968aefc3b4927a6fb2027a" +dependencies = [ + "serde", + "serde_json", + "unicode-normalization", +] + [[package]] name = "once_cell" version = "1.18.0" @@ -3445,17 +3377,11 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" dependencies = [ "bitflags 2.4.1", "cfg-if 1.0.0", @@ -3474,7 +3400,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3485,18 +3411,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.1.5+3.1.3" +version = "300.1.6+3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559068e4c12950d7dcaa1857a61725c0d38d4fc03ff8e070ab31a75d6e316491" +checksum = "439fac53e092cd7442a3660c85dde4643ab3b5bd39040912388dcdabf6b88085" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" dependencies = [ "cc", "libc", @@ -3549,35 +3475,41 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "outbound-http" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "http", "reqwest", "spin-app", "spin-core", + "spin-locked-app", + "spin-outbound-networking", "spin-world", + "terminal", "tracing", "url", ] [[package]] name = "outbound-mysql" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "flate2", "mysql_async", "mysql_common", + "spin-app", "spin-core", + "spin-outbound-networking", "spin-world", + "table", "tokio", "tracing", "url", @@ -3585,14 +3517,17 @@ dependencies = [ [[package]] name = "outbound-pg" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "native-tls", "postgres-native-tls", + "spin-app", "spin-core", + "spin-outbound-networking", "spin-world", + "table", "tokio", "tokio-postgres", "tracing", @@ -3600,13 +3535,16 @@ dependencies = [ [[package]] name = "outbound-redis" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "redis", + "spin-app", "spin-core", + "spin-outbound-networking", "spin-world", + "table", "tokio", "tracing", ] @@ -3627,17 +3565,6 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -3645,21 +3572,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -3722,10 +3635,10 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "digest 0.10.7", + "digest", "hmac", "password-hash", - "sha2 0.10.8", + "sha2", ] [[package]] @@ -3734,15 +3647,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - [[package]] name = "pem" version = "2.0.1" @@ -3776,7 +3680,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset 0.4.2", - "indexmap 2.0.2", + "indexmap 2.1.0", ] [[package]] @@ -3835,7 +3739,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3850,12 +3754,53 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + [[package]] name = "pkg-config" version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if 1.0.0", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + +[[package]] +name = "polling" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" +dependencies = [ + "cfg-if 1.0.0", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.21", + "tracing", + "windows-sys 0.48.0", +] + [[package]] name = "postgres-native-tls" version = "0.5.0" @@ -3878,12 +3823,12 @@ dependencies = [ "base64 0.21.5", "byteorder", "bytes", - "fallible-iterator", + "fallible-iterator 0.2.0", "hmac", "md-5", "memchr", "rand 0.8.5", - "sha2 0.10.8", + "sha2", "stringprep", ] @@ -3894,7 +3839,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d2234cdee9408b523530a9b6d2d6b373d1db34f6a8e51dc03ded1828d7fb67c" dependencies = [ "bytes", - "fallible-iterator", + "fallible-iterator 0.2.0", "postgres-protocol", ] @@ -3917,7 +3862,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "059a34f111a9dee2ce1ac2826a68b24601c4298cfeb1a587c3cb493d5ab46f52" dependencies = [ "libc", - "nix 0.22.3", + "nix 0.27.1", ] [[package]] @@ -3991,7 +3936,7 @@ dependencies = [ "flate2", "hex", "lazy_static", - "rustix 0.36.16", + "rustix 0.36.17", ] [[package]] @@ -4174,17 +4119,6 @@ dependencies = [ "cc", ] -[[package]] -name = "pulldown-cmark" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffade02495f22453cd593159ea2f59827aae7f53fa8323f756799b670881dcf8" -dependencies = [ - "bitflags 1.3.2", - "memchr", - "unicase", -] - [[package]] name = "quote" version = "1.0.33" @@ -4262,16 +4196,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" @@ -4281,15 +4205,6 @@ 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.8.0" @@ -4321,12 +4236,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "reborrow" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" - [[package]] name = "redis" version = "0.21.7" @@ -4345,7 +4254,7 @@ dependencies = [ "sha1 0.6.1", "tokio", "tokio-native-tls", - "tokio-util 0.7.9", + "tokio-util 0.7.10", "url", ] @@ -4378,12 +4287,12 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom 0.2.10", - "redox_syscall 0.2.16", + "libredox", "thiserror", ] @@ -4441,7 +4350,7 @@ version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "async-compression 0.4.4", + "async-compression", "base64 0.21.5", "bytes", "encoding_rs", @@ -4449,8 +4358,8 @@ dependencies = [ "futures-util", "h2", "http", - "http-body", - "hyper", + "http-body 0.4.5", + "hyper 0.14.27", "hyper-rustls", "hyper-tls", "ipnet", @@ -4461,7 +4370,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.7", + "rustls 0.21.8", "rustls-pemfile 1.0.3", "serde", "serde_json", @@ -4470,7 +4379,7 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls 0.24.1", - "tokio-util 0.7.9", + "tokio-util 0.7.10", "tower-service", "url", "wasm-bindgen", @@ -4510,6 +4419,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "rle-decode-fast" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" + [[package]] name = "rusqlite" version = "0.29.0" @@ -4517,7 +4432,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" dependencies = [ "bitflags 2.4.1", - "fallible-iterator", + "fallible-iterator 0.2.0", "fallible-streaming-iterator", "hashlink", "libsqlite3-sys", @@ -4593,9 +4508,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.16" +version = "0.36.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6da3636faa25820d8648e0e31c5d519bbb01f72fdf57131f0f5f7da5fed36eab" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" dependencies = [ "bitflags 1.3.2", "errno", @@ -4607,30 +4522,30 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.26" +version = "0.37.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f3f8f960ed3b5a59055428714943298bf3fa2d4a1d53135084e0544829d995" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" 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.20" +version = "0.38.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" dependencies = [ "bitflags 2.4.1", "errno", + "itoa", "libc", "linux-raw-sys 0.4.10", + "once_cell", "windows-sys 0.48.0", ] @@ -4648,12 +4563,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.7" +version = "0.21.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" dependencies = [ "log", - "ring 0.16.20", + "ring 0.17.5", "rustls-webpki", "sct", ] @@ -4678,12 +4593,12 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.6" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -4707,16 +4622,6 @@ dependencies = [ "libc", ] -[[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" @@ -4759,12 +4664,12 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -4795,21 +4700,12 @@ name = "semver" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" -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.189" +version = "1.0.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "a834c4821019838224821468552240d4d95d14e751986442c816572d39a080c9" dependencies = [ "serde_derive", ] @@ -4823,45 +4719,34 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half 1.8.2", - "serde", -] - [[package]] name = "serde_derive" -version = "1.0.189" +version = "1.0.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" +checksum = "46fa52d5646bce91b680189fe5b1c049d2ea38dabb4e2e7c8d00ca12cfbfbcfd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] -name = "serde_json" -version = "1.0.107" +name = "serde_ignored" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "80c31d5c53fd39f208e770f5a20a0bb214dee2a8d0d8adba18e19ad95a482ca5" dependencies = [ - "itoa", - "ryu", "serde", ] [[package]] -name = "serde_path_to_error" -version = "0.1.14" +name = "serde_json" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", + "ryu", "serde", ] @@ -4876,6 +4761,15 @@ dependencies = [ "thiserror", ] +[[package]] +name = "serde_spanned" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -4905,7 +4799,7 @@ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -4914,19 +4808,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha2" version = "0.10.8" @@ -4935,7 +4816,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -4981,24 +4862,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror", - "time", -] - [[package]] name = "siphasher" version = "0.3.11" @@ -5014,22 +4877,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "sled" -version = "0.34.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" -dependencies = [ - "crc32fast", - "crossbeam-epoch", - "crossbeam-utils", - "fs2", - "fxhash", - "libc", - "log", - "parking_lot 0.11.2", -] - [[package]] name = "slice-group-by" version = "0.3.1" @@ -5062,6 +4909,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" @@ -5076,103 +4932,95 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spin-app" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "async-trait", - "base64 0.21.5", "ouroboros", "serde", "serde_json", "spin-core", + "spin-locked-app", + "spin-serde", "thiserror", ] [[package]] name = "spin-common" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "dirs 4.0.0", - "sha2 0.10.8", + "sha2", + "tempfile", "tokio", + "url", ] [[package]] name = "spin-componentize" version = "0.1.0" -source = "git+https://github.com/fermyon/spin-componentize?rev=0aa9622d2dafbdacae55b1fd62eb5bb36bf84b2d#0aa9622d2dafbdacae55b1fd62eb5bb36bf84b2d" +source = "git+https://github.com/fermyon/spin-componentize?rev=191789170abde10cd55590466c0660dd6c7d472a#191789170abde10cd55590466c0660dd6c7d472a" dependencies = [ "anyhow", - "wasm-encoder 0.29.0", - "wasmparser 0.107.0", + "wasm-encoder 0.35.0", + "wasmparser 0.115.0", "wit-component", "wit-parser", ] -[[package]] -name = "spin-config" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" -dependencies = [ - "anyhow", - "async-trait", - "dotenvy", - "once_cell", - "serde", - "spin-app", - "spin-core", - "spin-world", - "thiserror", - "tokio", - "vaultrs", -] - [[package]] name = "spin-core" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "async-trait", + "bytes", "cap-std", "crossbeam-channel", "io-extras", - "rustix 0.37.26", + "rustix 0.37.27", "system-interface", + "tokio", "tracing", "wasi-common", "wasmtime", "wasmtime-wasi", + "wasmtime-wasi-http", ] [[package]] name = "spin-http" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "http", - "hyper", + "http-body-util", + "hyper 1.0.0-rc.3", "indexmap 1.9.3", "percent-encoding", "serde", "spin-app", + "spin-locked-app", "tracing", + "wasmtime-wasi-http", ] [[package]] name = "spin-key-value" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "lru 0.9.0", "spin-app", "spin-core", "spin-world", + "table", "tokio", "tracing", ] @@ -5180,7 +5028,7 @@ dependencies = [ [[package]] name = "spin-key-value-azure" version = "0.1.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "azure_data_cosmos", @@ -5195,7 +5043,7 @@ dependencies = [ [[package]] name = "spin-key-value-redis" version = "0.1.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "redis", @@ -5209,7 +5057,7 @@ dependencies = [ [[package]] name = "spin-key-value-sqlite" version = "0.1.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "once_cell", @@ -5222,38 +5070,41 @@ dependencies = [ [[package]] name = "spin-llm" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "bytesize", - "candle-core", - "candle-nn", - "chrono", "llm", - "lru 0.9.0", - "num_cpus", - "rand 0.8.5", - "safetensors", - "serde", "spin-app", "spin-core", "spin-world", - "terminal", - "tokenizers", - "tokio", +] + +[[package]] +name = "spin-llm-remote-http" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" +dependencies = [ + "anyhow", + "http", + "llm", + "reqwest", + "serde", + "serde_json", + "spin-core", + "spin-llm", + "spin-world", "tracing", - "uuid", ] [[package]] name = "spin-loader" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "async-trait", - "bindle", "bytes", "dirs 4.0.0", "dunce", @@ -5266,37 +5117,97 @@ dependencies = [ "path-absolutize", "regex", "reqwest", - "semver", + "semver", + "serde", + "serde_json", + "sha2", + "shellexpand 3.1.0", + "spin-common", + "spin-locked-app", + "spin-manifest", + "spin-outbound-networking", + "tempfile", + "terminal", + "thiserror", + "tokio", + "tokio-util 0.6.10", + "toml 0.8.8", + "tracing", + "walkdir", +] + +[[package]] +name = "spin-locked-app" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" +dependencies = [ + "anyhow", + "async-trait", + "ouroboros", + "serde", + "serde_json", + "spin-serde", + "thiserror", +] + +[[package]] +name = "spin-manifest" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" +dependencies = [ + "anyhow", + "indexmap 1.9.3", + "serde", + "spin-serde", + "terminal", + "thiserror", + "toml 0.8.8", + "url", +] + +[[package]] +name = "spin-oci" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" +dependencies = [ + "anyhow", + "async-compression", + "async-tar", + "base64 0.21.5", + "dirs 4.0.0", + "dkregistry", + "docker_credential", + "futures-util", + "oci-distribution", + "reqwest", "serde", "serde_json", - "shellexpand 3.1.0", "spin-common", - "spin-config", + "spin-loader", + "spin-locked-app", "spin-manifest", "tempfile", - "terminal", "tokio", - "tokio-util 0.6.10", - "toml", + "tokio-util 0.7.10", "tracing", "walkdir", ] [[package]] -name = "spin-manifest" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +name = "spin-outbound-networking" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ - "indexmap 1.9.3", - "serde", - "thiserror", - "toml", + "anyhow", + "spin-locked-app", + "terminal", + "url", ] [[package]] name = "spin-redis-engine" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "async-trait", @@ -5310,24 +5221,33 @@ dependencies = [ "tracing", ] +[[package]] +name = "spin-serde" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" +dependencies = [ + "base64 0.21.5", + "serde", +] + [[package]] name = "spin-sqlite" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "async-trait", "spin-app", "spin-core", - "spin-key-value", "spin-world", + "table", "tokio", ] [[package]] name = "spin-sqlite-inproc" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "async-trait", @@ -5341,12 +5261,13 @@ dependencies = [ [[package]] name = "spin-sqlite-libsql" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "async-trait", "libsql-client", + "rusqlite", "spin-sqlite", "spin-world", "sqlparser", @@ -5355,12 +5276,12 @@ dependencies = [ [[package]] name = "spin-trigger" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "async-trait", - "clap 3.2.25", + "clap", "ctrlc", "dirs 4.0.0", "futures", @@ -5375,39 +5296,42 @@ dependencies = [ "spin-app", "spin-common", "spin-componentize", - "spin-config", "spin-core", "spin-key-value", "spin-key-value-azure", "spin-key-value-redis", "spin-key-value-sqlite", "spin-llm", + "spin-llm-remote-http", "spin-loader", "spin-manifest", "spin-sqlite", "spin-sqlite-inproc", "spin-sqlite-libsql", + "spin-variables", "spin-world", "terminal", "tokio", - "toml", + "toml 0.5.11", "tracing", "url", "wasmtime", + "wasmtime-wasi-http", ] [[package]] name = "spin-trigger-http" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "async-trait", - "clap 3.2.25", + "clap", "futures", "futures-util", "http", - "hyper", + "http-body-util", + "hyper 1.0.0-rc.3", "indexmap 1.9.3", "outbound-http", "percent-encoding", @@ -5417,6 +5341,7 @@ dependencies = [ "spin-app", "spin-core", "spin-http", + "spin-outbound-networking", "spin-trigger", "spin-world", "terminal", @@ -5424,15 +5349,35 @@ dependencies = [ "tokio", "tokio-rustls 0.23.4", "tracing", + "url", "wasi-common", "wasmtime", "wasmtime-wasi", + "wasmtime-wasi-http", +] + +[[package]] +name = "spin-variables" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" +dependencies = [ + "anyhow", + "async-trait", + "dotenvy", + "once_cell", + "serde", + "spin-app", + "spin-core", + "spin-world", + "thiserror", + "tokio", + "vaultrs", ] [[package]] name = "spin-world" -version = "1.5.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "wasmtime", ] @@ -5463,7 +5408,7 @@ checksum = "c3995a6daa13c113217b6ad22154865fb06f9cb939bef398fd04f4a7aaaf5bd7" dependencies = [ "bitflags 2.4.1", "cc", - "fallible-iterator", + "fallible-iterator 0.2.0", "indexmap 1.9.3", "log", "memchr", @@ -5512,6 +5457,25 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strum" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" + +[[package]] +name = "strum_macros" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38" +dependencies = [ + "heck 0.3.3", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + [[package]] name = "subprocess" version = "0.2.9" @@ -5541,9 +5505,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -5591,20 +5555,25 @@ dependencies = [ [[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.1", "cap-fs-ext", "cap-std", "fd-lock", "io-lifetimes 2.0.2", - "rustix 0.38.20", + "rustix 0.38.21", "windows-sys 0.48.0", - "winx 0.36.2", + "winx", ] +[[package]] +name = "table" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" + [[package]] name = "tap" version = "1.0.1" @@ -5619,7 +5588,7 @@ checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", - "xattr", + "xattr 1.0.1", ] [[package]] @@ -5630,14 +5599,14 @@ checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tempfile" -version = "3.8.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if 1.0.0", "fastrand 2.0.1", - "redox_syscall 0.3.5", - "rustix 0.38.20", + "redox_syscall 0.4.1", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -5653,7 +5622,7 @@ dependencies = [ [[package]] name = "terminal" version = "0.1.0" -source = "git+https://github.com/fermyon/spin?tag=v1.5.0#ca08dd933de32fe09f4c318fbbc1f04853f2085f" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "atty", "once_cell", @@ -5683,7 +5652,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -5739,7 +5708,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e8a215badde081a06ee0a7fbc9c9f0d580c022fbdc547065f62103aef71e178" dependencies = [ "futures-util", - "hyper", + "hyper 0.14.27", "pin-project-lite", "thiserror", "tokio", @@ -5754,12 +5723,10 @@ checksum = "aea68938177975ab09da68552b720eac941779ff386baceaf77e0f5f9cea645f" dependencies = [ "aho-corasick 0.7.20", "cached-path", - "clap 4.4.6", "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", @@ -5793,7 +5760,7 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2 0.5.5", @@ -5819,7 +5786,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -5841,11 +5808,11 @@ dependencies = [ "async-trait", "byteorder", "bytes", - "fallible-iterator", + "fallible-iterator 0.2.0", "futures-channel", "futures-util", "log", - "parking_lot 0.12.1", + "parking_lot", "percent-encoding", "phf", "pin-project-lite", @@ -5854,7 +5821,7 @@ dependencies = [ "rand 0.8.5", "socket2 0.5.5", "tokio", - "tokio-util 0.7.9", + "tokio-util 0.7.10", "whoami", ] @@ -5875,7 +5842,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.7", + "rustls 0.21.8", "tokio", ] @@ -5890,21 +5857,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-tar" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5714c010ca3e5c27114c1cdeb9d14641ace49874aa5626d7149e47aedace75" -dependencies = [ - "filetime", - "futures-core", - "libc", - "redox_syscall 0.3.5", - "tokio", - "tokio-stream", - "xattr", -] - [[package]] name = "tokio-util" version = "0.6.10" @@ -5921,12 +5873,13 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", "pin-project-lite", "tokio", @@ -5942,6 +5895,41 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +dependencies = [ + "indexmap 2.1.0", + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.1.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "tonic" version = "0.9.2" @@ -5956,8 +5944,8 @@ dependencies = [ "futures-util", "h2", "http", - "http-body", - "hyper", + "http-body 0.4.5", + "hyper 0.14.27", "hyper-timeout", "percent-encoding", "pin-project", @@ -5997,7 +5985,7 @@ dependencies = [ "rand 0.8.5", "slab", "tokio", - "tokio-util 0.7.9", + "tokio-util 0.7.10", "tower-layer", "tower-service", "tracing", @@ -6035,7 +6023,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -6047,16 +6035,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[package]] name = "try-lock" version = "0.2.4" @@ -6113,8 +6091,8 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 0.1.10", - "rand 0.8.5", + "cfg-if 1.0.0", + "rand 0.7.3", "static_assertions", ] @@ -6220,12 +6198,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.5.0" @@ -6312,9 +6284,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-cap-std-sync" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2fe3aaf51c1e1a04a490e89f0a9cab789d21a496c0ce398d49a24f8df883a58" +checksum = "3fd94e147b273348ec68ae412b8bc17a4d372b9e070535b98e3e2c5a3ffd8e83" dependencies = [ "anyhow", "async-trait", @@ -6324,10 +6296,9 @@ dependencies = [ "cap-time-ext", "fs-set-times", "io-extras", - "io-lifetimes 1.0.11", - "is-terminal", + "io-lifetimes 2.0.2", "once_cell", - "rustix 0.37.26", + "rustix 0.38.21", "system-interface", "tracing", "wasi-common", @@ -6336,17 +6307,17 @@ dependencies = [ [[package]] name = "wasi-common" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74e9a2c8bfda59870a8bff38a31b9ba80b6fdb7abdfd2487177b85537d2e8a8" +checksum = "8d5166f7432ee36d06aa9f9bd7990a00330401fdbc75be7887ea952a299b9a19" dependencies = [ "anyhow", - "bitflags 1.3.2", + "bitflags 2.4.1", "cap-rand", "cap-std", "io-extras", "log", - "rustix 0.37.26", + "rustix 0.38.21", "thiserror", "tracing", "wasmtime", @@ -6356,15 +6327,15 @@ dependencies = [ [[package]] name = "wasi-tokio" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6014a120600e99067c99a347e4ffa7d783def8f4a3154b44e5d1382539ff78ef" +checksum = "862e148e4aec5e7dbb7fbff7a9f1afac83a4236e99971beef19ca32c1060ad53" dependencies = [ "anyhow", "cap-std", "io-extras", - "io-lifetimes 1.0.11", - "rustix 0.37.26", + "io-lifetimes 2.0.2", + "rustix 0.38.21", "tokio", "wasi-cap-std-sync", "wasi-common", @@ -6373,9 +6344,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -6383,24 +6354,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -6410,9 +6381,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6420,52 +6391,55 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "wasm-encoder" -version = "0.29.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18c41dbd92eaebf3612a39be316540b8377c871cb9bde6b064af962984912881" +checksum = "9ca90ba1b5b0a70d3d49473c5579951f3bddc78d47b59256d2f9d4922b150aca" dependencies = [ "leb128", ] [[package]] name = "wasm-encoder" -version = "0.35.0" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca90ba1b5b0a70d3d49473c5579951f3bddc78d47b59256d2f9d4922b150aca" +checksum = "822b645bf4f2446b949776ffca47e2af60b167209ffb70814ef8779d299cd421" dependencies = [ "leb128", ] [[package]] name = "wasm-metadata" -version = "0.8.0" +version = "0.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36e5156581ff4a302405c44ca7c85347563ca431d15f1a773f12c9c7b9a6cdc9" +checksum = "2167ce53b2faa16a92c6cafd4942cff16c9a4fa0c5a5a0a41131ee4e49fc055f" dependencies = [ "anyhow", - "indexmap 1.9.3", + "indexmap 2.1.0", "serde", - "wasm-encoder 0.29.0", - "wasmparser 0.107.0", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder 0.36.2", + "wasmparser 0.116.1", ] [[package]] @@ -6483,39 +6457,39 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.107.0" +version = "0.115.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +checksum = "e06c0641a4add879ba71ccb3a1e4278fd546f76f1eafb21d8f7b07733b547cd5" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.1.0", "semver", ] [[package]] name = "wasmparser" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e06c0641a4add879ba71ccb3a1e4278fd546f76f1eafb21d8f7b07733b547cd5" +checksum = "a58e28b80dd8340cb07b8242ae654756161f6fc8d0038123d679b7b99964fa50" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "semver", ] [[package]] name = "wasmprinter" -version = "0.2.70" +version = "0.2.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74458a9bc5cc9c7108abfa0fe4dc88d5abf1f3baf194df3264985f17d559b5e" +checksum = "9aff4df0cdf1906ec040e97d78c3fc8fd26d3f8d70adaac81f07f80957b63b54" dependencies = [ "anyhow", - "wasmparser 0.115.0", + "wasmparser 0.116.1", ] [[package]] name = "wasmtime" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc104ced94ff0a6981bde77a0bc29aab4af279914a4143b8d1af9fd4b2c9d41" +checksum = "ca54f6090ce46973f33a79f265924b204f248f91aec09229bce53d19d567c1a6" dependencies = [ "anyhow", "async-trait", @@ -6524,18 +6498,20 @@ dependencies = [ "cfg-if 1.0.0", "encoding_rs", "fxprof-processed-profile", - "indexmap 1.9.3", + "indexmap 2.1.0", "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.35.0", + "wasmparser 0.115.0", "wasmtime-cache", "wasmtime-component-macro", "wasmtime-component-util", @@ -6551,43 +6527,43 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b28e5661a9b5f7610a62ab3c69222fa161f7bd31d04529e856461d8c3e706b" +checksum = "54984bc0b5689da87a43d7c181d23092b4d5cfcbb7ae3eb6b917dd55865d95e6" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "wasmtime-cache" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f58ddfe801df3886feaf466d883ea37e941bcc6d841b9f644a08c7acabfe7f8" +checksum = "1a4df7655bb73b592189033ab046aa47c1da486d70bc9c1ebf45e55ac030bdf4" dependencies = [ "anyhow", "base64 0.21.5", "bincode", "directories-next", - "file-per-thread-logger", "log", - "rustix 0.37.26", + "rustix 0.38.21", "serde", - "sha2 0.10.8", - "toml", + "serde_derive", + "sha2", + "toml 0.5.11", "windows-sys 0.48.0", "zstd", ] [[package]] name = "wasmtime-component-macro" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39725d9633fb064bd3a6d83c5ea5077289256de0862d3d96295822edb13419c0" +checksum = "64de99fb7c4c383832b85efcaae95f7094a5c505d80146227ce97ab436cbac68" dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", "wasmtime-component-util", "wasmtime-wit-bindgen", "wit-parser", @@ -6595,66 +6571,69 @@ dependencies = [ [[package]] name = "wasmtime-component-util" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1153feafc824f95dc69472cb89a3396b3b05381f781a7508b01840f9df7b1a51" +checksum = "9f9141a8df069e106eee0c3a8173c0809cf1a4b5630628cfb1f25ab114720093" [[package]] name = "wasmtime-cranelift" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc1e39ce9aa0fa0b319541ed423960b06cfa7343eca1574f811ea34275739c2" +checksum = "1cf3cee8be02f5006d21b773ffd6802f96a0b7d661ff2ad8a01fb93df458b1aa" dependencies = [ "anyhow", + "cfg-if 1.0.0", "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.115.0", "wasmtime-cranelift-shared", "wasmtime-environ", + "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-cranelift-shared" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dd32739326690e51c76551d7cbf29d371e7de4dc7b37d2d503be314ab5b7d04" +checksum = "420fd2a69bc162957f4c94f21c7fa08ecf60d916f4e87b56332507c555da381d" 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 = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b60e4ae5c9ae81750d8bc59110bf25444aa1d9266c19999c3b64b801db3c73" +checksum = "fb6a445ce2b2810127caee6c1b79b8da4ae57712b05556a674592c18b7500a14" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.27.3", - "indexmap 1.9.3", + "gimli", + "indexmap 2.1.0", "log", - "object 0.30.4", + "object", "serde", + "serde_derive", "target-lexicon", "thiserror", - "wasm-encoder 0.29.0", - "wasmparser 0.107.0", + "wasm-encoder 0.35.0", + "wasmparser 0.115.0", "wasmprinter", "wasmtime-component-util", "wasmtime-types", @@ -6662,35 +6641,37 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd40c8d869916ee6b1f3fcf1858c52041445475ca8550aee81c684c0eb530ca" +checksum = "345a8b061c9eab459e10b9112df9fc357d5a9e8b5b1004bc5fc674fba9be6d2a" dependencies = [ "cc", "cfg-if 1.0.0", - "rustix 0.37.26", + "rustix 0.38.21", "wasmtime-asm-macros", + "wasmtime-versioned-export-macros", "windows-sys 0.48.0", ] [[package]] name = "wasmtime-jit" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655b23a10eddfe7814feb548a466f3f25aa4bb4f43098a147305c544a2de28e1" +checksum = "1f0f6586c61125fbfc13c3108c3dd565d21f314dd5bac823b9a5b7ab576d21f1" dependencies = [ - "addr2line 0.19.0", + "addr2line", "anyhow", "bincode", "cfg-if 1.0.0", "cpp_demangle", - "gimli 0.27.3", + "gimli", "ittapi", "log", - "object 0.30.4", + "object", "rustc-demangle", - "rustix 0.37.26", + "rustix 0.38.21", "serde", + "serde_derive", "target-lexicon", "wasmtime-environ", "wasmtime-jit-debug", @@ -6701,20 +6682,21 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e46b7e98979a69d3df093076bde8431204e3c96a770e8d216fea365c627d88a4" +checksum = "109a9e46afe33580b952b14a4207354355f19bcdf0b47485b397b68409eaf553" dependencies = [ - "object 0.30.4", + "object", "once_cell", - "rustix 0.37.26", + "rustix 0.38.21", + "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb1e7c68ede63dc7a98c3e473162954e224951854e229c8b4e74697fe17dbdd" +checksum = "f67e6be36375c39cff57ed3b137ab691afbf2d9ba8ee1c01f77888413f218749" dependencies = [ "cfg-if 1.0.0", "libc", @@ -6723,63 +6705,86 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843e33bf9e0f0c57902c87a1dea1389cc23865c65f007214318dbdfcb3fd4ae5" +checksum = "1d07986b2327b5e7f535ed638fbde25990fc8f85400194fda0d26db71c7b685e" dependencies = [ "anyhow", "cc", "cfg-if 1.0.0", "encoding_rs", - "indexmap 1.9.3", + "indexmap 2.1.0", "libc", "log", "mach", "memfd", - "memoffset 0.8.0", + "memoffset 0.9.0", "paste", "rand 0.8.5", - "rustix 0.37.26", + "rustix 0.38.21", "sptr", + "wasm-encoder 0.35.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 = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7473a07bebd85671bada453123e3d465c8e0a59668ff79f5004076e6a2235ef5" +checksum = "e810a0d2e869abd1cb42bd232990f6bd211672b3d202d2ae7e70ffb97ed70ea3" dependencies = [ "cranelift-entity", "serde", + "serde_derive", "thiserror", - "wasmparser 0.107.0", + "wasmparser 0.115.0", +] + +[[package]] +name = "wasmtime-versioned-export-macros" +version = "14.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b5575a75e711ca6c36bb9ad647c93541cdc8e34218031acba5da3f35919dd3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", ] [[package]] name = "wasmtime-wasi" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff7b3b3272ad5b4ba63c9aac6248da6f06a8227d0c0d6017d89225d794e966c" +checksum = "1e6730a2853226292cee755a36549dd1a443b324cf99319cb390af1afed6cb8a" dependencies = [ "anyhow", "async-trait", - "bitflags 1.3.2", + "bitflags 2.4.1", + "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", "libc", - "rustix 0.37.26", + "log", + "once_cell", + "rustix 0.38.21", "system-interface", "thiserror", + "tokio", "tracing", + "url", "wasi-cap-std-sync", "wasi-common", "wasi-tokio", @@ -6788,18 +6793,41 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wasmtime-wasi-http" +version = "14.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df20fc6047a3676298bbc93194f4d9040263ae7dde6cfb121ffbf005d13c7b3" +dependencies = [ + "anyhow", + "async-trait", + "bytes", + "futures", + "http", + "http-body 1.0.0-rc.2", + "http-body-util", + "hyper 1.0.0-rc.3", + "rustls 0.21.8", + "tokio", + "tokio-rustls 0.24.1", + "tracing", + "wasmtime", + "wasmtime-wasi", + "webpki-roots", +] + [[package]] name = "wasmtime-winch" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351c9d4e60658dd0cf616c12c5508f86cc2cefcc0cff307eed0a31b23d3c0b70" +checksum = "c1c1b6abbba5a01739bef9f00a87b419414a7dd99b795823d93fb12fc2bf994a" dependencies = [ "anyhow", "cranelift-codegen", - "gimli 0.27.3", - "object 0.30.4", + "gimli", + "object", "target-lexicon", - "wasmparser 0.107.0", + "wasmparser 0.115.0", "wasmtime-cranelift-shared", "wasmtime-environ", "winch-codegen", @@ -6807,15 +6835,22 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f114407efbd09e4ef67053b6ae54c16455a821ef2f6096597fcba83b7625e59c" +checksum = "9d214ca7513d76af2872ad5bba4b0dcc0225821931745fdcb4fc30dd34bc3bf7" dependencies = [ "anyhow", "heck 0.4.1", + "indexmap 2.1.0", "wit-parser", ] +[[package]] +name = "wasmtime-wmemcheck" +version = "14.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dafab2db172a53e23940e0fa3078c202f567ee5f13f4b42f66b694fab43c658" + [[package]] name = "wast" version = "35.0.2" @@ -6827,30 +6862,30 @@ dependencies = [ [[package]] name = "wast" -version = "66.0.2" +version = "67.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93cb43b0ac6dd156f2c375735ccfd72b012a7c0a6e6d09503499b8d3cb6e6072" +checksum = "a974d82fac092b5227c1663e16514e7a85f32014e22e6fdcb08b71aec9d3fb1e" dependencies = [ "leb128", "memchr", "unicode-width", - "wasm-encoder 0.35.0", + "wasm-encoder 0.36.2", ] [[package]] name = "wat" -version = "1.0.77" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e367582095d2903caeeea9acbb140e1db9c7677001efa4347c3687fd34fe7072" +checksum = "adb220934f92f8551144c0003d1bc57a060674c99139f45ed623fbbf6d9262e7" dependencies = [ - "wast 66.0.2", + "wast 67.0.1", ] [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ "js-sys", "wasm-bindgen", @@ -6881,7 +6916,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.20", + "rustix 0.38.21", ] [[package]] @@ -6896,13 +6931,13 @@ dependencies = [ [[package]] name = "wiggle" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63f150c6e39ef29a58139564c5ed7a0ef34d6df8a8eecd4233af85a576968d9" +checksum = "7f6ce56a4019ce3d8592c298029a75abe6887d1c95a078a4c53ec77a0628262d" dependencies = [ "anyhow", "async-trait", - "bitflags 1.3.2", + "bitflags 2.4.1", "thiserror", "tracing", "wasmtime", @@ -6911,28 +6946,28 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f31e961fb0a5ad3ff10689c85f327f4abf10b4cac033b9d7372ccbb106aea24" +checksum = "e585a4b1e84195031c77d8484af99cd93f129f45d519e83cb8cc75e9a420cfd3" dependencies = [ "anyhow", "heck 0.4.1", "proc-macro2", "quote", "shellexpand 2.1.2", - "syn 1.0.109", + "syn 2.0.39", "witx", ] [[package]] name = "wiggle-macro" -version = "10.0.2" +version = "14.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a28ae3d6b90f212beca7fab5910d0a3b1a171290c06eaa81bb39f41e6f74589" +checksum = "c6f321dbce722989d65c3082dba479fa392c7b7a1a4c3adc2a39545dd5aa452f" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", "wiggle-generate", ] @@ -6969,17 +7004,17 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.8.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf2ac354be169bb201de7867b84f45d91d0ef812f67f11c33f74a7f5a24e56" +checksum = "f112bebb367a544d20c254083798087f22ceeb426168a970b955e8436f749dca" dependencies = [ "anyhow", "cranelift-codegen", - "gimli 0.27.3", + "gimli", "regalloc2", "smallvec", "target-lexicon", - "wasmparser 0.107.0", + "wasmparser 0.115.0", "wasmtime-environ", ] @@ -7125,23 +7160,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] -name = "winreg" -version = "0.50.0" +name = "winnow" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" dependencies = [ - "cfg-if 1.0.0", - "windows-sys 0.48.0", + "memchr", ] [[package]] -name = "winx" -version = "0.35.1" +name = "winreg" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c52a121f0fbf9320d5f2a9a5d82f6cb7557eda5e8b47fc3e7f359ec866ae960" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "bitflags 1.3.2", - "io-lifetimes 1.0.11", + "cfg-if 1.0.0", "windows-sys 0.48.0", ] @@ -7157,34 +7190,38 @@ dependencies = [ [[package]] name = "wit-component" -version = "0.11.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cbd4c7f8f400327c482c88571f373844b7889e61460650d650fc5881bb3575c" +checksum = "65672b7a81f9c7a4420af2ad8d0de608e27b520a6d4b68f29f5146e060a86ee4" dependencies = [ "anyhow", - "bitflags 1.3.2", - "indexmap 1.9.3", + "bitflags 2.4.1", + "indexmap 2.1.0", "log", - "wasm-encoder 0.29.0", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.36.2", "wasm-metadata", - "wasmparser 0.107.0", + "wasmparser 0.116.1", "wit-parser", ] [[package]] name = "wit-parser" -version = "0.8.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6daec9f093dbaea0e94043eeb92ece327bbbe70c86b1f41aca9bbfefd7f050f0" +checksum = "43771ee863a16ec4ecf9da0fc65c3bbd4a1235c8e3da5f094b562894843dfa76" dependencies = [ "anyhow", "id-arena", - "indexmap 1.9.3", + "indexmap 2.1.0", "log", - "pulldown-cmark", "semver", + "serde", + "serde_derive", + "serde_json", "unicode-xid", - "url", ] [[package]] @@ -7210,51 +7247,40 @@ dependencies = [ [[package]] name = "xattr" -version = "1.0.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" +checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" dependencies = [ "libc", ] [[package]] -name = "zerocopy" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c19fae0c8a9efc6a8281f2e623db8af1db9e57852e04cde3e754dd2dc29340f" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.11" +name = "xattr" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc56589e9ddd1f1c28d4b4b5c773ce232910a6bb67a70133d61c9e347585efe9" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", + "libc", ] [[package]] -name = "zeroize" -version = "1.3.0" +name = "zerocopy" +version = "0.7.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557" dependencies = [ - "zeroize_derive", + "zerocopy-derive", ] [[package]] -name = "zeroize_derive" -version = "1.4.2" +name = "zerocopy-derive" +version = "0.7.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] diff --git a/containerd-shim-spin-v1/Cargo.toml b/containerd-shim-spin/Cargo.toml similarity index 65% rename from containerd-shim-spin-v1/Cargo.toml rename to containerd-shim-spin/Cargo.toml index f841eae8..e98fc511 100644 --- a/containerd-shim-spin-v1/Cargo.toml +++ b/containerd-shim-spin/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "containerd-shim-spin-v1" +name = "containerd-shim-spin-v2" version = "0.9.2" authors = ["DeisLabs Engineering Team"] edition = "2021" @@ -11,16 +11,18 @@ Containerd shim for running Spin workloads. """ [dependencies] -containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", tag = "containerd-shim-wasm/v0.4.0" } +containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "c768e5b0919ca02903a301bf82a390489437dabe" } log = "0.4" -spin-app = { git = "https://github.com/fermyon/spin", tag = "v1.5.0" } -spin-core = { git = "https://github.com/fermyon/spin", tag = "v1.5.0" } -spin-trigger = { git = "https://github.com/fermyon/spin", tag = "v1.5.0" } -spin-trigger-http = { git = "https://github.com/fermyon/spin", tag = "v1.5.0" } -spin-redis-engine = { git = "https://github.com/fermyon/spin", tag = "v1.5.0" } -spin-manifest = { git = "https://github.com/fermyon/spin", tag = "v1.5.0" } -spin-loader = { git = "https://github.com/fermyon/spin", tag = "v1.5.0" } -wasmtime = "10.0.1" +spin-app = { git = "https://github.com/fermyon/spin", tag = "v2.0.0" } +spin-core = { git = "https://github.com/fermyon/spin", tag = "v2.0.0" } +spin-trigger = { git = "https://github.com/fermyon/spin", tag = "v2.0.0" } +spin-trigger-http = { git = "https://github.com/fermyon/spin", tag = "v2.0.0" } +spin-redis-engine = { git = "https://github.com/fermyon/spin", tag = "v2.0.0" } +spin-manifest = { git = "https://github.com/fermyon/spin", tag = "v2.0.0" } +spin-loader = { git = "https://github.com/fermyon/spin", tag = "v2.0.0" } +spin-oci = { git = "https://github.com/fermyon/spin", tag = "v2.0.0" } +spin-common = { git = "https://github.com/fermyon/spin", tag = "v2.0.0" } +wasmtime = "14.0.4" tokio = { version = "1", features = ["rt"] } openssl = { version = "*", features = ["vendored"] } serde = "1.0" @@ -28,4 +30,5 @@ serde_json = "1.0" url = "2.3" anyhow = "1.0" + [workspace] diff --git a/containerd-shim-spin-v1/Cross.toml b/containerd-shim-spin/Cross.toml similarity index 100% rename from containerd-shim-spin-v1/Cross.toml rename to containerd-shim-spin/Cross.toml diff --git a/containerd-shim-spin-v1/quickstart.md b/containerd-shim-spin/quickstart.md similarity index 100% rename from containerd-shim-spin-v1/quickstart.md rename to containerd-shim-spin/quickstart.md diff --git a/containerd-shim-spin/src/engine.rs b/containerd-shim-spin/src/engine.rs new file mode 100644 index 00000000..65ff7994 --- /dev/null +++ b/containerd-shim-spin/src/engine.rs @@ -0,0 +1,237 @@ +use anyhow::{anyhow, ensure, Context, Result}; +use containerd_shim_wasm::container::{Engine, RuntimeContext, Stdio}; +use log::info; +use spin_app::locked::LockedApp; +use spin_loader::FilesMountStrategy; +use spin_manifest::schema::v2::AppManifest; +use spin_redis_engine::RedisTrigger; +use spin_trigger::TriggerHooks; +use spin_trigger::{loader, RuntimeConfig, TriggerExecutor, TriggerExecutorBuilder}; +use spin_trigger_http::HttpTrigger; +use std::collections::HashSet; +use std::env; +use std::net::SocketAddr; +use std::net::ToSocketAddrs; +use std::path::{Path, PathBuf}; +use tokio::runtime::Runtime; +use url::Url; + +const SPIN_ADDR: &str = "0.0.0.0:80"; + +#[derive(Clone, Default)] +pub struct SpinEngine; + +struct StdioTriggerHook; +impl TriggerHooks for StdioTriggerHook { + fn app_loaded(&mut self, _app: &spin_app::App, _runtime_config: &RuntimeConfig) -> Result<()> { + Ok(()) + } + + fn component_store_builder( + &self, + _component: &spin_app::AppComponent, + builder: &mut spin_core::StoreBuilder, + ) -> Result<()> { + builder.inherit_stdout(); + builder.inherit_stderr(); + Ok(()) + } +} + +impl SpinEngine { + fn app_source(&self) -> Result { + spin_common::paths::resolve_manifest_file_path("/spin.toml") + } + + fn resolve_app_source(&self, app_source: PathBuf) -> Result { + Ok(ResolvedAppSource::File { + manifest_path: app_source.clone(), + manifest: spin_manifest::manifest_from_file(app_source)?, + }) + } + + async fn wasm_exec_async(&self) -> Result<()> { + let app_source = self.app_source()?; + let resolved_app_source = self.resolve_app_source(app_source.clone())?; + let trigger_cmd = trigger_command_for_resolved_app_source(&resolved_app_source) + .with_context(|| format!("Couldn't find trigger executor for {app_source:?}"))?; + let locked_app = self.load_resolved_app_source(resolved_app_source).await?; + self.run_trigger(&trigger_cmd, locked_app).await + } + + async fn run_trigger(&self, trigger_type: &str, app: LockedApp) -> Result<()> { + let working_dir = PathBuf::from("/"); + let f = match trigger_type { + HttpTrigger::TRIGGER_TYPE => { + let http_trigger: HttpTrigger = self + .build_spin_trigger(working_dir, app) + .await + .context("failed to build spin trigger")?; + info!(" >>> running spin trigger"); + http_trigger.run(spin_trigger_http::CliArgs { + address: parse_addr(SPIN_ADDR).unwrap(), + tls_cert: None, + tls_key: None, + }) + } + RedisTrigger::TRIGGER_TYPE => { + let redis_trigger: RedisTrigger = self + .build_spin_trigger(working_dir, app) + .await + .context("failed to build spin trigger")?; + + info!(" >>> running spin trigger"); + redis_trigger.run(spin_trigger::cli::NoArgs) + } + _ => { + todo!("Only Http and Redis triggers are currently supported.") + } + }; + info!(" >>> notifying main thread we are about to start"); + f.await + } + + async fn load_resolved_app_source( + &self, + resolved: ResolvedAppSource, + ) -> anyhow::Result { + match resolved { + ResolvedAppSource::File { manifest_path, .. } => { + // TODO: This should be configurable, see https://github.com/deislabs/containerd-wasm-shims/issues/166 + let files_mount_strategy = FilesMountStrategy::Direct; + + // create a cache directory at /.cache + // this is needed for the spin LocalLoader to work + // TODO: spin should provide a more flexible `loader::from_file` that + // does not assume the existance of a cache directory + let cache_dir = PathBuf::from("/.cache"); + env::set_var("XDG_CACHE_HOME", &cache_dir); + + if !cache_dir.exists() { + tokio::fs::create_dir_all(&cache_dir) + .await + .with_context(|| format!("failed to create {:?}", cache_dir))?; + } + + spin_loader::from_file(&manifest_path, files_mount_strategy).await + } + ResolvedAppSource::OciRegistry { locked_app } => Ok(locked_app), + } + } + + async fn write_locked_app(&self, locked_app: &LockedApp, working_dir: &Path) -> Result { + let locked_path = working_dir.join("spin.lock"); + let locked_app_contents = + serde_json::to_vec_pretty(&locked_app).context("failed to serialize locked app")?; + tokio::fs::write(&locked_path, locked_app_contents) + .await + .with_context(|| format!("failed to write {:?}", locked_path))?; + let locked_url = Url::from_file_path(&locked_path) + .map_err(|_| anyhow!("cannot convert to file URL: {locked_path:?}"))? + .to_string(); + + Ok(locked_url) + } + + async fn build_spin_trigger( + &self, + working_dir: PathBuf, + app: LockedApp, + ) -> Result + where + for<'de> ::TriggerConfig: serde::de::Deserialize<'de>, + { + let locked_url = self.write_locked_app(&app, &working_dir).await?; + + // Build trigger config + let loader = loader::TriggerLoader::new(working_dir.clone(), true); + let runtime_config = RuntimeConfig::new(PathBuf::from("/").into()); + let mut builder = TriggerExecutorBuilder::new(loader); + builder + .hooks(StdioTriggerHook {}) + .config_mut() + .wasmtime_config() + .cranelift_opt_level(spin_core::wasmtime::OptLevel::Speed); + let init_data = Default::default(); + let executor = builder.build(locked_url, runtime_config, init_data).await?; + Ok(executor) + } +} + +impl Engine for SpinEngine { + fn name() -> &'static str { + "spin" + } + + fn run_wasi(&self, _ctx: &impl RuntimeContext, stdio: Stdio) -> Result { + info!("setting up wasi"); + stdio.redirect()?; + let rt = Runtime::new().context("failed to create runtime")?; + + rt.block_on(self.wasm_exec_async())?; + Ok(0) + } + + fn can_handle(&self, _ctx: &impl RuntimeContext) -> Result<()> { + Ok(()) + } +} + +fn parse_addr(addr: &str) -> Result { + let addrs: SocketAddr = addr + .to_socket_addrs()? + .next() + .ok_or_else(|| anyhow!("could not parse address: {}", addr))?; + Ok(addrs) +} + +// TODO: we should use spin's ResolvedAppSource +pub enum ResolvedAppSource { + File { + manifest_path: PathBuf, + manifest: AppManifest, + }, + OciRegistry { + locked_app: LockedApp, + }, +} + +impl ResolvedAppSource { + pub fn trigger_type(&self) -> anyhow::Result<&str> { + let types = match self { + ResolvedAppSource::File { manifest, .. } => { + manifest.triggers.keys().collect::>() + } + ResolvedAppSource::OciRegistry { locked_app: _ } => { + todo!("OCI not yet supported") + } + }; + + ensure!(!types.is_empty(), "no triggers in app"); + ensure!(types.len() == 1, "multiple trigger types not yet supported"); + Ok(types.into_iter().next().unwrap()) + } +} + +fn trigger_command_for_resolved_app_source(resolved: &ResolvedAppSource) -> Result { + let trigger_type = resolved.trigger_type()?; + + match trigger_type { + RedisTrigger::TRIGGER_TYPE | HttpTrigger::TRIGGER_TYPE => Ok(trigger_type.to_owned()), + _ => { + todo!("Only Http and Redis triggers are currently supported.") + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn can_parse_spin_address() { + let parsed = parse_addr(SPIN_ADDR).unwrap(); + assert_eq!(parsed.clone().port(), 80); + assert_eq!(parsed.ip().to_string(), "0.0.0.0"); + } +} diff --git a/containerd-shim-spin-v1/src/main.rs b/containerd-shim-spin/src/main.rs similarity index 88% rename from containerd-shim-spin-v1/src/main.rs rename to containerd-shim-spin/src/main.rs index 3fb84c5c..6312c41f 100644 --- a/containerd-shim-spin-v1/src/main.rs +++ b/containerd-shim-spin/src/main.rs @@ -4,5 +4,5 @@ use containerd_shim_wasm::sandbox::cli::{revision, shim_main, version}; mod engine; fn main() { - shim_main::>("spin", version!(), revision!(), None); + shim_main::>("spin", version!(), revision!(), "v2", None); } diff --git a/containerd-shim-wws-v1/Cargo.lock b/containerd-shim-wws/Cargo.lock similarity index 99% rename from containerd-shim-wws-v1/Cargo.lock rename to containerd-shim-wws/Cargo.lock index abac7f02..6801eb2d 100644 --- a/containerd-shim-wws-v1/Cargo.lock +++ b/containerd-shim-wws/Cargo.lock @@ -819,7 +819,7 @@ dependencies = [ [[package]] name = "containerd-shim-wasm" version = "0.4.0" -source = "git+https://github.com/containerd/runwasi?tag=containerd-shim-wasm/v0.4.0#5788ced8525a0d2831718f4a24d06fb4d5af6afb" +source = "git+https://github.com/containerd/runwasi?rev=c768e5b0919ca02903a301bf82a390489437dabe#c768e5b0919ca02903a301bf82a390489437dabe" dependencies = [ "anyhow", "caps", @@ -2043,9 +2043,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libcgroups" diff --git a/containerd-shim-wws-v1/Cargo.toml b/containerd-shim-wws/Cargo.toml similarity index 95% rename from containerd-shim-wws-v1/Cargo.toml rename to containerd-shim-wws/Cargo.toml index 80191d17..79459a69 100644 --- a/containerd-shim-wws-v1/Cargo.toml +++ b/containerd-shim-wws/Cargo.toml @@ -14,7 +14,7 @@ Containerd shim for running Wasm Workers Server workloads. [dependencies] anyhow = "1.0" -containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", tag = "containerd-shim-wasm/v0.4.0" } +containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "c768e5b0919ca02903a301bf82a390489437dabe" } wasm-workers-server = { git = "https://github.com/vmware-labs/wasm-workers-server", tag = "v1.7.0" } log = "0.4" tokio = { version = "1", features = [ "full" ] } diff --git a/containerd-shim-wws-v1/Cross.toml b/containerd-shim-wws/Cross.toml similarity index 100% rename from containerd-shim-wws-v1/Cross.toml rename to containerd-shim-wws/Cross.toml diff --git a/containerd-shim-wws-v1/quickstart.md b/containerd-shim-wws/quickstart.md similarity index 100% rename from containerd-shim-wws-v1/quickstart.md rename to containerd-shim-wws/quickstart.md diff --git a/containerd-shim-wws-v1/src/engine.rs b/containerd-shim-wws/src/engine.rs similarity index 100% rename from containerd-shim-wws-v1/src/engine.rs rename to containerd-shim-wws/src/engine.rs diff --git a/containerd-shim-wws-v1/src/main.rs b/containerd-shim-wws/src/main.rs similarity index 89% rename from containerd-shim-wws-v1/src/main.rs rename to containerd-shim-wws/src/main.rs index 30be93a4..23953557 100644 --- a/containerd-shim-wws-v1/src/main.rs +++ b/containerd-shim-wws/src/main.rs @@ -4,5 +4,5 @@ use containerd_shim_wasm::sandbox::cli::{revision, shim_main, version}; mod engine; fn main() { - shim_main::>("wws", version!(), revision!(), None); + shim_main::>("wws", version!(), revision!(), "v1", None); } diff --git a/deployments/k3d/Makefile b/deployments/k3d/Makefile index 433995d1..bc737a7e 100644 --- a/deployments/k3d/Makefile +++ b/deployments/k3d/Makefile @@ -1,5 +1,5 @@ SHIMS = spin slight wws lunatic - +SPIN_VERSION = v2 IMAGE_NAME ?= k3swithshims CLUSTER_NAME ?= k3s-default PLATFORM ?= linux/amd64 @@ -15,8 +15,10 @@ compile-musl-%: move-musl-to-tmp: $(addprefix compile-musl-,$(SHIMS)) mkdir -p ./.tmp - $(foreach shim,$(SHIMS),cp ../../containerd-shim-$(shim)-v1/target/$(TARGET)/release/containerd-shim-*-v1 ./.tmp/;) - + cp ../../containerd-shim-spin/target/$(TARGET)/release/containerd-shim-spin-$(SPIN_VERSION) ./.tmp/ + cp ../../containerd-shim-slight/target/$(TARGET)/release/containerd-shim-slight-v1 ./.tmp/ + cp ../../containerd-shim-wws/target/$(TARGET)/release/containerd-shim-wws-v1 ./.tmp/ + cp ../../containerd-shim-lunatic/target/$(TARGET)/release/containerd-shim-lunatic-v1 ./.tmp/ build-multi-k3d-image: move-musl-to-tmp docker buildx build -t $(IMAGE_NAME) --platform linux/amd64,linux/arm64 . diff --git a/deployments/k3d/config.toml.tmpl b/deployments/k3d/config.toml.tmpl index 2338ad8b..b8da1f8c 100644 --- a/deployments/k3d/config.toml.tmpl +++ b/deployments/k3d/config.toml.tmpl @@ -102,7 +102,7 @@ enable_keychain = true {{end}} [plugins.cri.containerd.runtimes.spin] - runtime_type = "io.containerd.spin.v1" + runtime_type = "io.containerd.spin.v2" [plugins.cri.containerd.runtimes.slight] runtime_type = "io.containerd.slight.v1" diff --git a/deployments/k8s/all-in-one-demo.yaml b/deployments/k8s/all-in-one-demo.yaml index a700ea49..4554bdf1 100644 --- a/deployments/k8s/all-in-one-demo.yaml +++ b/deployments/k8s/all-in-one-demo.yaml @@ -10,11 +10,11 @@ scheduling: apiVersion: node.k8s.io/v1 kind: RuntimeClass metadata: - name: "wasmtime-spin-v1" + name: "wasmtime-spin-v2" handler: "spin" scheduling: nodeSelector: - "kubernetes.azure.com/wasmtime-spin-v1": "true" + "kubernetes.azure.com/wasmtime-spin-v2": "true" --- apiVersion: node.k8s.io/v1 kind: RuntimeClass @@ -71,7 +71,7 @@ spec: labels: app: wasm-spin spec: - runtimeClassName: wasmtime-spin-v1 + runtimeClassName: wasmtime-spin-v2 containers: - name: testwasm image: ghcr.io/deislabs/containerd-wasm-shims/examples/spin-rust-hello:latest diff --git a/images/spin/Cargo.lock b/images/spin/Cargo.lock index 5357bc19..0ef52c6e 100644 --- a/images/spin/Cargo.lock +++ b/images/spin/Cargo.lock @@ -4,19 +4,19 @@ version = 3 [[package]] name = "anyhow" -version = "1.0.70" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "async-trait" -version = "0.1.67" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ea188f25f0255d8f92797797c97ebf5631fa88178beb1a46fdf5622c9a00e4" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.4", + "syn 2.0.39", ] [[package]] @@ -27,21 +27,21 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "1.3.2" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] -name = "bitflags" -version = "2.3.3" +name = "bytes" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] -name = "bytes" -version = "1.4.0" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "fnv" @@ -51,28 +51,108 @@ 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", ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "futures" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] [[package]] -name = "heck" -version = "0.3.3" +name = "futures-channel" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ - "unicode-segmentation", + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" + +[[package]] +name = "futures-executor" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" + +[[package]] +name = "futures-macro" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", ] +[[package]] +name = "futures-sink" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" + +[[package]] +name = "futures-task" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" + +[[package]] +name = "futures-util" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "hashbrown" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" + [[package]] name = "heck" version = "0.4.1" @@ -99,32 +179,22 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" -[[package]] -name = "idna" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "indexmap" -version = "1.9.3" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ - "autocfg", + "equivalent", "hashbrown", "serde", ] [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "leb128" @@ -134,47 +204,54 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "once_cell" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[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 = "proc-macro2" -version = "1.0.52" +name = "pin-project-lite" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" -dependencies = [ - "unicode-ident", -] +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "pulldown-cmark" -version = "0.8.0" +name = "proc-macro2" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffade02495f22453cd593159ea2f59827aae7f53fa8323f756799b670881dcf8" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ - "bitflags 1.3.2", - "memchr", - "unicase", + "unicode-ident", ] [[package]] name = "quote" -version = "1.0.26" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -189,32 +266,64 @@ dependencies = [ "smartstring", ] +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + [[package]] name = "semver" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.164" +version = "1.0.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "a834c4821019838224821468552240d4d95d14e751986442c816572d39a080c9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "46fa52d5646bce91b680189fe5b1c049d2ea38dabb4e2e7c8d00ca12cfbfbcfd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.4", + "syn 2.0.39", +] + +[[package]] +name = "serde_json" +version = "1.0.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +dependencies = [ + "itoa", + "ryu", + "serde", ] +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" + [[package]] name = "smartcow" version = "0.2.1" @@ -235,10 +344,19 @@ dependencies = [ "version_check", ] +[[package]] +name = "spdx" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b19b32ed6d899ab23174302ff105c1577e45a06b08d4fe0a9dd13ce804bbbf71" +dependencies = [ + "smallvec", +] + [[package]] name = "spin-macro" version = "0.1.0" -source = "git+https://github.com/fermyon/spin?tag=v1.4.0#7aab1fe43be70a271ba6336b959cd52191fc2253" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", "bytes", @@ -250,25 +368,29 @@ dependencies = [ [[package]] name = "spin-rust-hello" -version = "0.8.0" +version = "0.9.2" dependencies = [ "anyhow", - "bytes", "http", + "serde", "spin-sdk", - "wit-bindgen-rust 0.2.0", ] [[package]] name = "spin-sdk" -version = "1.4.0" -source = "git+https://github.com/fermyon/spin?tag=v1.4.0#7aab1fe43be70a271ba6336b959cd52191fc2253" +version = "2.0.0" +source = "git+https://github.com/fermyon/spin?tag=v2.0.0#e4bb2357067d29f053b2d039476180ffa31222b2" dependencies = [ "anyhow", + "async-trait", "bytes", "form_urlencoded", + "futures", "http", + "once_cell", "routefinder", + "serde", + "serde_json", "spin-macro", "thiserror", "wit-bindgen", @@ -293,9 +415,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.4" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c622ae390c9302e214c31013517c2061ecb2699935882c60a9b37f82f8625ae" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -304,68 +426,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.4", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", + "syn 2.0.39", ] -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-segmentation" @@ -379,17 +462,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "url" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - [[package]] name = "version_check" version = "0.9.4" @@ -398,31 +470,34 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasm-encoder" -version = "0.29.0" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18c41dbd92eaebf3612a39be316540b8377c871cb9bde6b064af962984912881" +checksum = "822b645bf4f2446b949776ffca47e2af60b167209ffb70814ef8779d299cd421" dependencies = [ "leb128", ] [[package]] name = "wasm-metadata" -version = "0.8.0" +version = "0.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36e5156581ff4a302405c44ca7c85347563ca431d15f1a773f12c9c7b9a6cdc9" +checksum = "2167ce53b2faa16a92c6cafd4942cff16c9a4fa0c5a5a0a41131ee4e49fc055f" dependencies = [ "anyhow", "indexmap", "serde", + "serde_derive", + "serde_json", + "spdx", "wasm-encoder", "wasmparser", ] [[package]] name = "wasmparser" -version = "0.107.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +checksum = "a58e28b80dd8340cb07b8242ae654756161f6fc8d0038123d679b7b99964fa50" dependencies = [ "indexmap", "semver", @@ -430,151 +505,85 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.8.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "392d16e9e46cc7ca98125bc288dd5e4db469efe8323d3e0dac815ca7f2398522" +checksum = "38726c54a5d7c03cac28a2a8de1006cfe40397ddf6def3f836189033a413bc08" dependencies = [ - "bitflags 2.3.3", + "bitflags", "wit-bindgen-rust-macro", ] [[package]] name = "wit-bindgen-core" -version = "0.8.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d422d36cbd78caa0e18c3371628447807c66ee72466b69865ea7e33682598158" +checksum = "c8bf1fddccaff31a1ad57432d8bfb7027a7e552969b6c68d6d8820dcf5c2371f" dependencies = [ "anyhow", "wit-component", - "wit-parser 0.8.0", -] - -[[package]] -name = "wit-bindgen-gen-core" -version = "0.2.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=cb871cfa1ee460b51eb1d144b175b9aab9c50aba#cb871cfa1ee460b51eb1d144b175b9aab9c50aba" -dependencies = [ - "anyhow", - "wit-parser 0.2.0", -] - -[[package]] -name = "wit-bindgen-gen-rust" -version = "0.2.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=cb871cfa1ee460b51eb1d144b175b9aab9c50aba#cb871cfa1ee460b51eb1d144b175b9aab9c50aba" -dependencies = [ - "heck 0.3.3", - "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" -dependencies = [ - "heck 0.3.3", - "wit-bindgen-gen-core", - "wit-bindgen-gen-rust", + "wit-parser", ] [[package]] name = "wit-bindgen-rust" -version = "0.2.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=cb871cfa1ee460b51eb1d144b175b9aab9c50aba#cb871cfa1ee460b51eb1d144b175b9aab9c50aba" -dependencies = [ - "async-trait", - "bitflags 1.3.2", - "wit-bindgen-rust-impl", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.8.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b76db68264f5d2089dc4652581236d8e75c5b89338de6187716215fd0e68ba3" +checksum = "0e7200e565124801e01b7b5ddafc559e1da1b2e1bed5364d669cd1d96fb88722" dependencies = [ - "heck 0.4.1", + "anyhow", + "heck", "wasm-metadata", "wit-bindgen-core", - "wit-bindgen-rust-lib", "wit-component", ] -[[package]] -name = "wit-bindgen-rust-impl" -version = "0.2.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=cb871cfa1ee460b51eb1d144b175b9aab9c50aba#cb871cfa1ee460b51eb1d144b175b9aab9c50aba" -dependencies = [ - "proc-macro2", - "syn 1.0.109", - "wit-bindgen-gen-core", - "wit-bindgen-gen-rust-wasm", -] - -[[package]] -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" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced38a5e174940c6a41ae587babeadfd2e2c2dc32f3b6488bcdca0e8922cf3f3" +checksum = "4ae33920ad8119fe72cf59eb00f127c0b256a236b9de029a1a10397b1f38bdbd" dependencies = [ "anyhow", "proc-macro2", - "syn 2.0.4", + "quote", + "syn 2.0.39", "wit-bindgen-core", - "wit-bindgen-rust 0.8.0", + "wit-bindgen-rust", "wit-component", ] [[package]] name = "wit-component" -version = "0.11.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cbd4c7f8f400327c482c88571f373844b7889e61460650d650fc5881bb3575c" +checksum = "480cc1a078b305c1b8510f7c455c76cbd008ee49935f3a6c5fd5e937d8d95b1e" dependencies = [ "anyhow", - "bitflags 1.3.2", + "bitflags", "indexmap", "log", + "serde", + "serde_derive", + "serde_json", "wasm-encoder", "wasm-metadata", "wasmparser", - "wit-parser 0.8.0", + "wit-parser", ] [[package]] name = "wit-parser" -version = "0.2.0" -source = "git+https://github.com/bytecodealliance/wit-bindgen?rev=cb871cfa1ee460b51eb1d144b175b9aab9c50aba#cb871cfa1ee460b51eb1d144b175b9aab9c50aba" -dependencies = [ - "anyhow", - "id-arena", - "pulldown-cmark", - "unicode-normalization", - "unicode-xid", -] - -[[package]] -name = "wit-parser" -version = "0.8.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6daec9f093dbaea0e94043eeb92ece327bbbe70c86b1f41aca9bbfefd7f050f0" +checksum = "43771ee863a16ec4ecf9da0fc65c3bbd4a1235c8e3da5f094b562894843dfa76" dependencies = [ "anyhow", "id-arena", "indexmap", "log", - "pulldown-cmark", "semver", + "serde", + "serde_derive", + "serde_json", "unicode-xid", - "url", ] diff --git a/images/spin/Cargo.toml b/images/spin/Cargo.toml index 7a81ae78..86a63c35 100644 --- a/images/spin/Cargo.toml +++ b/images/spin/Cargo.toml @@ -9,10 +9,9 @@ crate-type = ["cdylib"] [dependencies] anyhow = "1" -bytes = "1" -http = "0.2" -spin-sdk = { git = "https://github.com/fermyon/spin", tag = "v1.4.1" } -wit-bindgen-rust = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "cb871cfa1ee460b51eb1d144b175b9aab9c50aba" } +http = "0.2.9" +serde = { version = "1.0", features = ["derive"] } +spin-sdk = { git = "https://github.com/fermyon/spin", tag = "v2.0.0" } [workspace] diff --git a/images/spin/Dockerfile b/images/spin/Dockerfile index a2d0b490..dd4361fb 100644 --- a/images/spin/Dockerfile +++ b/images/spin/Dockerfile @@ -1,13 +1,13 @@ -FROM --platform=${BUILDPLATFORM} rust:1.69 AS build +FROM --platform=${BUILDPLATFORM} rust:1.71 AS build WORKDIR /opt/build COPY . . RUN rustup target add wasm32-wasi && cargo build --target wasm32-wasi --release -FROM --platform=linux/amd64 golang:1.19.5-bullseye AS build-go +FROM --platform=linux/amd64 golang:1.21.3-bullseye AS build-go WORKDIR /opt/build COPY . . -RUN curl -LO https://github.com/tinygo-org/tinygo/releases/download/v0.25.0/tinygo_0.25.0_amd64.deb && dpkg -i tinygo_0.25.0_amd64.deb -RUN cd go-hello && tinygo build -wasm-abi=generic -target=wasi -gc=leaking -o spin_go_hello.wasm main.go +RUN curl -LO https://github.com/tinygo-org/tinygo/releases/download/v0.30.0/tinygo_0.30.0_amd64.deb && dpkg -i tinygo_0.30.0_amd64.deb +RUN cd go-hello && tinygo build -target=wasi -o spin_go_hello.wasm main.go FROM scratch COPY --from=build /opt/build/target/wasm32-wasi/release/spin_rust_hello.wasm . diff --git a/images/spin/go-hello/go.mod b/images/spin/go-hello/go.mod index d80d88b6..098c0c61 100644 --- a/images/spin/go-hello/go.mod +++ b/images/spin/go-hello/go.mod @@ -2,6 +2,8 @@ module github.com/deislabs/containerd-wasm-shims/go-hello -go 1.17 +go 1.20 -require github.com/fermyon/spin/sdk/go v0.7.1 \ No newline at end of file +require github.com/fermyon/spin/sdk/go/v2 v2.0.0 + +require github.com/julienschmidt/httprouter v1.3.0 // indirect \ No newline at end of file diff --git a/images/spin/go-hello/go.sum b/images/spin/go-hello/go.sum index 50cd5c99..7312075f 100644 --- a/images/spin/go-hello/go.sum +++ b/images/spin/go-hello/go.sum @@ -1,2 +1,4 @@ -github.com/fermyon/spin/sdk/go v0.7.1 h1:3Qyn8D8jb9YJ7wwDwxv3MigiG58jNLEpdfJ59vE6wcA= -github.com/fermyon/spin/sdk/go v0.7.1/go.mod h1:ARV2oVtnUCykLM+xCBZq8MQrCZddzb3JbeBettYv1S0= +github.com/fermyon/spin/sdk/go/v2 v2.0.0 h1:pMq2BxXio9gsBdPVNCuebCsLSt64yaTS3kV2l1gL088= +github.com/fermyon/spin/sdk/go/v2 v2.0.0/go.mod h1:kfJ+gdf/xIaKrsC6JHCUDYMv2Bzib1ohFIYUzvP+SCw= +github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= diff --git a/images/spin/go-hello/main.go b/images/spin/go-hello/main.go index 31f14c01..fe3662c4 100644 --- a/images/spin/go-hello/main.go +++ b/images/spin/go-hello/main.go @@ -2,13 +2,33 @@ package main import ( "fmt" + "io" "net/http" - spinhttp "github.com/fermyon/spin/sdk/go/http" + spinhttp "github.com/fermyon/spin/sdk/go/v2/http" ) func init() { spinhttp.Handle(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "text/plain") + w.Header().Set("foo", "bar") + + fmt.Fprintln(w, "== REQUEST ==") + fmt.Fprintln(w, "URL: ", r.URL) + fmt.Fprintln(w, "Method: ", r.Method) + fmt.Fprintln(w, "Headers:") + for k, v := range r.Header { + fmt.Fprintf(w, " %q: %q \n", k, v[0]) + } + + body, err := io.ReadAll(r.Body) + if err != nil { + fmt.Fprintln(w, "Body Error: ", err) + } else { + fmt.Fprintln(w, "Body: ", string(body)) + } + + fmt.Fprintln(w, "== RESPONSE ==") fmt.Fprintln(w, "Hello Spin Shim!") }) } diff --git a/images/spin/spin.toml b/images/spin/spin.toml index e053d689..17ffeaa0 100644 --- a/images/spin/spin.toml +++ b/images/spin/spin.toml @@ -1,18 +1,22 @@ -spin_version = "1" +spin_manifest_version = 2 + +[application] authors = ["DeisLabs Engineering Team"] description = "A simple spin hello world" name = "spin-hello" -trigger = { type = "http", base = "/" } version = "1.0.0" -[[component]] -id = "hello" -source = "spin_rust_hello.wasm" -[component.trigger] + +[[trigger.http]] route = "/hello" +component = "hello" + +[[trigger.http]] +route = "/go-hello" +component = "go-hello" + +[component.hello] +source = "spin_rust_hello.wasm" -[[component]] -id = "go-hello" -source = "spin_go_hello.wasm" -[component.trigger] -route = "/go-hello" \ No newline at end of file +[component.go-hello] +source = "spin_go_hello.wasm" \ No newline at end of file diff --git a/images/spin/src/lib.rs b/images/spin/src/lib.rs index fe9700f5..3a94787c 100644 --- a/images/spin/src/lib.rs +++ b/images/spin/src/lib.rs @@ -1,13 +1,8 @@ -use anyhow::Result; -use spin_sdk::{ - http::{Request, Response}, - http_component, -}; +use spin_sdk::http::{IntoResponse, Response}; +use spin_sdk::http_component; +/// A simple Spin HTTP component. #[http_component] -fn hello_world(_req: Request) -> Result { - println!("Hello, world! You should see me in pod logs"); - Ok(http::Response::builder() - .status(200) - .body(Some("Hello world from Spin!".into()))?) +fn hello_world(_req: http::Request<()>) -> anyhow::Result { + Ok(Response::new(200, "Hello world from Spin!")) } \ No newline at end of file diff --git a/scripts/move-bins.sh b/scripts/move-bins.sh index 87874422..0620351d 100755 --- a/scripts/move-bins.sh +++ b/scripts/move-bins.sh @@ -20,28 +20,29 @@ set -euo pipefail target="${2:-x86_64-unknown-linux-musl}" -release_pattern="${1:-containerd-shim-%s-v1/target/$target/release}" +release_pattern="${1:-containerd-shim-%s/target/$target/release}" dockerfile_path="deployments/k3d" bin_path="${dockerfile_path}/.tmp/" cluster_name="test-cluster" -default_shim_path="${bin_path}containerd-shim-" declare -A shims=( - [slight]="${default_shim_path}slight-v1" - [spin]="${default_shim_path}spin-v1" - [wws]="${default_shim_path}wws-v1" - [lunatic]="${default_shim_path}lunatic-v1" + [slight]="v1" + [spin]="v2" + [wws]="v1" + [lunatic]="v1" ) mkdir -p "$bin_path" for shim_key in "${!shims[@]}"; do - shim_path=${shims[$shim_key]} + version=${shims[$shim_key]} + release_bin="containerd-shim-${shim_key}-${version}" + shim_path="${bin_path}${release_bin}" release_path=$(printf "$release_pattern" "$shim_key") if [ ! -f "$shim_path" ]; then - echo ">>> install containerd-shim-${shim_key}-v1 from $release_path" - cp "$(eval echo $release_path)/containerd-shim-${shim_key}-v1" "${bin_path}containerd-shim-${shim_key}-v1" + echo ">>> install $release_bin from $release_path" + cp "$release_path/$release_bin" "$shim_path" fi -done +done \ No newline at end of file