From f175c9fefb445d84e295527676e299c29b6e0a5e Mon Sep 17 00:00:00 2001 From: itowlson Date: Tue, 19 Nov 2024 12:58:58 +1300 Subject: [PATCH] Switch Rust templates to wasm32-wasip1 Signed-off-by: itowlson --- templates/http-rust/content/Cargo.toml.tmpl | 1 + templates/http-rust/content/spin.toml | 4 ++-- templates/redis-rust/content/Cargo.toml.tmpl | 1 + templates/redis-rust/content/spin.toml | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/http-rust/content/Cargo.toml.tmpl b/templates/http-rust/content/Cargo.toml.tmpl index d55a3190e2..dfcb4b5078 100644 --- a/templates/http-rust/content/Cargo.toml.tmpl +++ b/templates/http-rust/content/Cargo.toml.tmpl @@ -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] diff --git a/templates/http-rust/content/spin.toml b/templates/http-rust/content/spin.toml index 94648f7a06..de01ce2605 100644 --- a/templates/http-rust/content/spin.toml +++ b/templates/http-rust/content/spin.toml @@ -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"] diff --git a/templates/redis-rust/content/Cargo.toml.tmpl b/templates/redis-rust/content/Cargo.toml.tmpl index d25db80bf6..f27c558cf6 100644 --- a/templates/redis-rust/content/Cargo.toml.tmpl +++ b/templates/redis-rust/content/Cargo.toml.tmpl @@ -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] diff --git a/templates/redis-rust/content/spin.toml b/templates/redis-rust/content/spin.toml index ca297090e2..896929e31d 100644 --- a/templates/redis-rust/content/spin.toml +++ b/templates/redis-rust/content/spin.toml @@ -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"]