Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ jobs:

# Install all the toolchain dependencies
- name: Install Rust wasm target
run: rustup target add wasm32-wasip1 wasm32-unknown-unknown
run: rustup target add wasm32-wasip1 wasm32-wasip2 wasm32-unknown-unknown
- uses: mlugg/setup-zig@v2
with:
version: '0.14.1'
Expand Down Expand Up @@ -289,7 +289,7 @@ jobs:
run: rustup target add --toolchain ${{ env.RUST_VERSION }} ${{ matrix.config.target }}

- name: "Install Wasm Rust target"
run: rustup target add wasm32-wasip1 wasm32-unknown-unknown --toolchain ${{ env.RUST_VERSION }}
run: rustup target add wasm32-wasip1 wasm32-wasip2 wasm32-unknown-unknown --toolchain ${{ env.RUST_VERSION }}

- name: setup for cross-compiled linux aarch64 build
if: matrix.config.target == 'aarch64-unknown-linux-gnu'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
run: rustup target add --toolchain ${{ env.RUST_VERSION }} ${{ matrix.config.target }}

- name: "Install Wasm Rust target"
run: rustup target add wasm32-wasip1 wasm32-unknown-unknown --toolchain ${{ env.RUST_VERSION }}
run: rustup target add wasm32-wasip1 wasm32-wasip2 wasm32-unknown-unknown --toolchain ${{ env.RUST_VERSION }}

- name: setup for cross-compiled linux aarch64 build
if: matrix.config.target == 'aarch64-unknown-linux-gnu'
Expand Down
4 changes: 2 additions & 2 deletions examples/http-rust/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ route = "/hello"
component = "hello"

[component.hello]
source = "target/wasm32-wasip1/release/http_rust.wasm"
source = "target/wasm32-wasip2/release/http_rust.wasm"
description = "A simple component that returns hello."
[component.hello.build]
command = "cargo build --target wasm32-wasip1 --release"
command = "cargo build --target wasm32-wasip2 --release"
watch = ["src/**/*.rs", "Cargo.toml"]
8 changes: 4 additions & 4 deletions examples/spin-timer/app-example/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ interval_secs = 10
component = "five"

[component.three]
source = "target/wasm32-wasip1/release/timer_app_example.wasm"
source = "target/wasm32-wasip2/release/timer_app_example.wasm"
[component.three.variables]
message = "Fizz"
[component.three.build]
command = "cargo build --target wasm32-wasip1 --release"
command = "cargo build --target wasm32-wasip2 --release"

[component.five]
source = "target/wasm32-wasip1/release/timer_app_example.wasm"
source = "target/wasm32-wasip2/release/timer_app_example.wasm"
[component.five.variables]
message = "Buzz"
[component.five.build]
command = "cargo build --target wasm32-wasip1 --release"
command = "cargo build --target wasm32-wasip2 --release"
4 changes: 2 additions & 2 deletions examples/vault-variable-test/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ component = "vault-variable-test"
secret = { required = true }

[component.vault-variable-test]
source = "target/wasm32-wasip1/release/vault_variable_test.wasm"
source = "target/wasm32-wasip2/release/vault_variable_test.wasm"
allowed_outbound_hosts = []

[component.vault-variable-test.variables]
token = "{{ secret }}"

[component.vault-variable-test.build]
command = "cargo build --target wasm32-wasip1 --release"
command = "cargo build --target wasm32-wasip2 --release"
watch = ["src/**/*.rs", "Cargo.toml"]
4 changes: 2 additions & 2 deletions templates/http-rust/content/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ route = "{{http-path}}"
component = "{{project-name | kebab_case}}"

[component.{{project-name | kebab_case}}]
source = "target/wasm32-wasip1/release/{{project-name | snake_case}}.wasm"
source = "target/wasm32-wasip2/release/{{project-name | snake_case}}.wasm"
allowed_outbound_hosts = []
[component.{{project-name | kebab_case}}.build]
command = "cargo build --target wasm32-wasip1 --release"
command = "cargo build --target wasm32-wasip2 --release"
watch = ["src/**/*.rs", "Cargo.toml"]
4 changes: 2 additions & 2 deletions templates/redis-rust/content/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ channel = "{{redis-channel}}"
component = "{{project-name | kebab_case}}"

[component.{{project-name | kebab_case}}]
source = "target/wasm32-wasip1/release/{{project-name | snake_case}}.wasm"
source = "target/wasm32-wasip2/release/{{project-name | snake_case}}.wasm"
allowed_outbound_hosts = []
[component.{{project-name | kebab_case}}.build]
command = "cargo build --target wasm32-wasip1 --release"
command = "cargo build --target wasm32-wasip2 --release"
watch = ["src/**/*.rs", "Cargo.toml"]
Loading