Skip to content

Commit

Permalink
Merge pull request #2927 from itowlson/rust-target-to-wasip1
Browse files Browse the repository at this point in the history
Switch Rust templates to wasm32-wasip1
  • Loading branch information
itowlson authored Nov 19, 2024
2 parents 606c48a + f175c9f commit 78f3e76
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions templates/http-rust/content/Cargo.toml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "{{project-name | kebab_case}}"
authors = ["{{authors}}"]
description = "{{project-description}}"
version = "0.1.0"
rust-version = "1.78"
edition = "2021"

[lib]
Expand Down
4 changes: 2 additions & 2 deletions templates/http-rust/content/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ route = "{{http-path}}"
component = "{{project-name | kebab_case}}"

[component.{{project-name | kebab_case}}]
source = "target/wasm32-wasi/release/{{project-name | snake_case}}.wasm"
source = "target/wasm32-wasip1/release/{{project-name | snake_case}}.wasm"
allowed_outbound_hosts = []
[component.{{project-name | kebab_case}}.build]
command = "cargo build --target wasm32-wasi --release"
command = "cargo build --target wasm32-wasip1 --release"
watch = ["src/**/*.rs", "Cargo.toml"]
1 change: 1 addition & 0 deletions templates/redis-rust/content/Cargo.toml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "{{project-name | kebab_case}}"
authors = ["{{authors}}"]
description = "{{project-description}}"
version = "0.1.0"
rust-version = "1.78"
edition = "2021"

[lib]
Expand Down
4 changes: 2 additions & 2 deletions templates/redis-rust/content/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ channel = "{{redis-channel}}"
component = "{{project-name | kebab_case}}"

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

0 comments on commit 78f3e76

Please sign in to comment.