Skip to content

Commit 7ebe282

Browse files
committed
chore(examples): Update Spin Rust SDK and other dependencies
The Rust examples were all using Spin SDK 2.2.0, which targets a release candidate of WASIp2, not the final version. That means they only ran in Spin, not other WASI runtimes such as Wasmtime. This commit updates all applicable examples to the latest Spin SDK and changes the build target to `wasm32-wasip2` to directly build components. Signed-off-by: Till Schneidereit <[email protected]>
1 parent 5430ac1 commit 7ebe282

File tree

13 files changed

+2299
-365
lines changed

13 files changed

+2299
-365
lines changed

examples/http-rust/Cargo.lock

Lines changed: 703 additions & 94 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/http-rust/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
22
name = "http-rust"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
55

66
[lib]
77
crate-type = ["cdylib"]
88

99
[dependencies]
1010
anyhow = "1"
11-
http = "0.2.9"
12-
spin-sdk = "2.2.0"
11+
http = "1.3.1"
12+
spin-sdk = "5.0.0"
1313

1414
[workspace]

examples/http-rust/spin.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ route = "/hello"
1111
component = "hello"
1212

1313
[component.hello]
14-
source = "target/wasm32-wasip1/release/http_rust.wasm"
14+
source = "target/wasm32-wasip2/release/http_rust.wasm"
1515
description = "A simple component that returns hello."
1616
[component.hello.build]
17-
command = "cargo build --target wasm32-wasip1 --release"
17+
command = "cargo build --target wasm32-wasip2 --release"
1818
watch = ["src/**/*.rs", "Cargo.toml"]

0 commit comments

Comments
 (0)