diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a527ed2..3926da1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,7 +19,7 @@ permissions: concurrency: ${{ github.workflow }} env: - PROGRAM_NAME: deps + PROGRAM_NAME: spin-deps jobs: lint: @@ -55,7 +55,7 @@ jobs: matrix: config: - { target: "x86_64-unknown-linux-gnu", os: "ubuntu-20.04", arch: "amd64", extension: ""} - - { target: "aarch64-unknown-linux-gnu", os: "ubuntu-20.04", arch: "aarch64", extension: "", extraArg: "--features openssl/vendored" } + - { target: "aarch64-unknown-linux-gnu", os: "ubuntu-20.04", arch: "aarch64", extension: "" } - { target: "x86_64-apple-darwin", os: "macos-13", arch: "amd64", extension: "" } - { target: "aarch64-apple-darwin", os: "macos-14", arch: "aarch64", extension: "" } - { target: "x86_64-pc-windows-msvc", os: "windows-latest", arch: "amd64", extension: ".exe" } @@ -82,10 +82,12 @@ jobs: run: | sudo apt update sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - echo '[target.aarch64-unknown-linux-gnu]' >> ${HOME}/.cargo/config.toml - echo 'linker = "aarch64-linux-gnu-gcc"' >> ${HOME}/.cargo/config.toml + if ! grep -q "\[target.aarch64-unknown-linux-gnu\]" ${HOME}/.cargo/config.toml; then + echo '[target.aarch64-unknown-linux-gnu]' >> ${HOME}/.cargo/config.toml + echo 'linker = "aarch64-linux-gnu-gcc"' >> ${HOME}/.cargo/config.toml + fi - name: Build plugin binary - run: cargo build --release --target ${{ matrix.config.target }} ${{ matrix.config.extraArg }} + run: cargo build --release --target ${{ matrix.config.target }} - name: Copy plugin binary to standard location shell: bash run: cp target/${{ matrix.config.target }}/release/${{ env.PROGRAM_NAME}}${{ matrix.config.extension }} target/release/${{ env.PROGRAM_NAME}}${{ matrix.config.extension }} diff --git a/Cargo.lock b/Cargo.lock index 9515674..23f67a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1100,18 +1100,18 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" dependencies = [ "darling 0.14.4", "proc-macro2", @@ -1121,9 +1121,9 @@ dependencies = [ [[package]] name = "derive_builder_macro" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" dependencies = [ "derive_builder_core", "syn 1.0.109", @@ -4121,6 +4121,7 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spin-app" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "anyhow", "async-trait", @@ -4133,6 +4134,7 @@ dependencies = [ [[package]] name = "spin-common" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "anyhow", "dirs 5.0.1", @@ -4169,6 +4171,7 @@ dependencies = [ [[package]] name = "spin-expressions" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "anyhow", "async-trait", @@ -4180,6 +4183,7 @@ dependencies = [ [[package]] name = "spin-factor-outbound-networking" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "anyhow", "futures-util", @@ -4206,6 +4210,7 @@ dependencies = [ [[package]] name = "spin-factor-variables" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "azure_core", "azure_identity", @@ -4224,6 +4229,7 @@ dependencies = [ [[package]] name = "spin-factor-wasi" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "async-trait", "bytes", @@ -4238,6 +4244,7 @@ dependencies = [ [[package]] name = "spin-factors" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "anyhow", "serde 1.0.210", @@ -4252,6 +4259,7 @@ dependencies = [ [[package]] name = "spin-factors-derive" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "proc-macro2", "quote", @@ -4261,6 +4269,7 @@ dependencies = [ [[package]] name = "spin-loader" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "anyhow", "async-trait", @@ -4299,6 +4308,7 @@ dependencies = [ [[package]] name = "spin-locked-app" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "anyhow", "async-trait", @@ -4311,6 +4321,7 @@ dependencies = [ [[package]] name = "spin-manifest" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "anyhow", "indexmap 2.5.0", @@ -4327,6 +4338,7 @@ dependencies = [ [[package]] name = "spin-serde" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "anyhow", "base64 0.22.1", @@ -4338,6 +4350,7 @@ dependencies = [ [[package]] name = "spin-world" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "async-trait", "wasmtime", @@ -4527,6 +4540,7 @@ dependencies = [ [[package]] name = "terminal" version = "2.8.0-pre0" +source = "git+https://github.com/fermyon/spin#6df7262df11bce1046fb838ed2e7b1126c2966c0" dependencies = [ "atty", "termcolor", @@ -4955,9 +4969,9 @@ dependencies = [ [[package]] name = "vaultrs" -version = "0.6.2" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267f958930e08323a44c12e6c5461f3eaaa16d88785e9ec8550215b8aafc3d0b" +checksum = "0bb996bb053adadc767f8b0bda2a80bc2b67d24fe89f2b959ae919e200d79a19" dependencies = [ "async-trait", "bytes", diff --git a/Cargo.toml b/Cargo.toml index 5bf25e4..a2bb917 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,9 +9,9 @@ clap = { version = "4.5.17", features = ["derive"] } dialoguer = "0.11.0" reqwest = "0.12.7" sha2 = "0.10.8" -spin-manifest = { path = "/Users/karthik_ganeshram/Work/fermyon/spin/crates/manifest" } -spin-serde = { path = "/Users/karthik_ganeshram/Work/fermyon/spin/crates/serde" } -spin-loader = { path = "/Users/karthik_ganeshram/Work/fermyon/spin/crates/loader" } +spin-manifest = { git = "https://github.com/fermyon/spin" } +spin-serde = { git = "https://github.com/fermyon/spin" } +spin-loader = { git = "https://github.com/fermyon/spin" } tokio = { version = "1.40.0", features = ["full"] } toml = "0.8.19" toml_edit = "0.22.21" diff --git a/src/commands/add.rs b/src/commands/add.rs index 04f1007..376bbea 100644 --- a/src/commands/add.rs +++ b/src/commands/add.rs @@ -103,7 +103,7 @@ impl AddCommand { for (package_name, interface) in exported_interfaces { package_interface_map .entry(package_name) - .or_insert_with(Vec::new) + .or_default() .push(interface); } @@ -212,11 +212,7 @@ impl AddCommand { }, AddCommand::Registry(src) => ComponentDependency::Package { version: src.version.to_string(), - registry: if let Some(registry) = &src.registry { - Some(registry.to_string()) - } else { - None - }, + registry: src.registry.as_ref().map(|registry| registry.to_string()), package: Some(src.package.clone().to_string()), export: None, },