Skip to content

Commit c7d20f7

Browse files
authored
Merge pull request #3396 from itowlson/the-hour-hath-come
Use `wasm32-wasip2` in Rust templates
2 parents 1c0ab4a + 43f671b commit c7d20f7

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

crates/templates/src/manager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,8 +876,8 @@ mod tests {
876876
assert!(cargo2.contains("name = \"hello-2\""));
877877

878878
let spin_toml = tokio::fs::read_to_string(&spin_toml_path).await.unwrap();
879-
assert!(spin_toml.contains("source = \"hello/target/wasm32-wasip1/release/hello.wasm\""));
880-
assert!(spin_toml.contains("source = \"encore/target/wasm32-wasip1/release/hello_2.wasm\""));
879+
assert!(spin_toml.contains("source = \"hello/target/wasm32-wasip2/release/hello.wasm\""));
880+
assert!(spin_toml.contains("source = \"encore/target/wasm32-wasip2/release/hello_2.wasm\""));
881881
}
882882

883883
#[tokio::test]

templates/http-rust/content/spin.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ route = "{{http-path}}"
1313
component = "{{project-name | kebab_case}}"
1414

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

templates/http-rust/metadata/snippets/component.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ route = "{{http-path}}"
33
component = "{{project-name | kebab_case}}"
44

55
[component.{{project-name | kebab_case}}]
6-
source = "{{ output-path }}/target/wasm32-wasip1/release/{{project-name | snake_case}}.wasm"
6+
source = "{{ output-path }}/target/wasm32-wasip2/release/{{project-name | snake_case}}.wasm"
77
allowed_outbound_hosts = []
88
[component.{{project-name | kebab_case}}.build]
9-
command = "cargo build --target wasm32-wasip1 --release"
9+
command = "cargo build --target wasm32-wasip2 --release"
1010
workdir = "{{ output-path }}"
1111
watch = ["src/**/*.rs", "Cargo.toml"]

templates/redis-rust/content/spin.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ channel = "{{redis-channel}}"
1616
component = "{{project-name | kebab_case}}"
1717

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

templates/redis-rust/metadata/snippets/component.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ channel = "{{redis-channel}}"
33
component = "{{project-name | kebab_case}}"
44

55
[component.{{project-name | kebab_case}}]
6-
source = "{{ output-path }}/target/wasm32-wasip1/release/{{project-name | snake_case}}.wasm"
6+
source = "{{ output-path }}/target/wasm32-wasip2/release/{{project-name | snake_case}}.wasm"
77
allowed_outbound_hosts = []
88
[component.{{project-name | kebab_case}}.build]
9-
command = "cargo build --target wasm32-wasip1 --release"
9+
command = "cargo build --target wasm32-wasip2 --release"
1010
workdir = "{{ output-path }}"
1111
watch = ["src/**/*.rs", "Cargo.toml"]

0 commit comments

Comments
 (0)