Skip to content

Commit d18317a

Browse files
authored
Merge pull request #286 from spinframework/bump-containerd-shim-wasm-v0.10.0
chore: bump containerd-shim-wasm to v0.10.0
2 parents 71fa954 + ae7bef3 commit d18317a

File tree

22 files changed

+106
-103
lines changed

22 files changed

+106
-103
lines changed

.devcontainer/bootstrap.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# Install Rustup Installer
22
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
33

4-
# Install rust and other components
5-
readonly RUST_UP_PATH=$HOME/.cargo/bin
6-
$RUST_UP_PATH/rustup update stable && $RUST_UP_PATH/rustup default stable && $RUST_UP_PATH/rustup component add clippy rustfmt
7-
8-
# Install wasm32-wasi target
9-
$RUST_UP_PATH/rustup target add wasm32-wasi wasm32-unknown-unknown
10-
114
# Install k3d
125
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash

Cargo.lock

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

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ tests/clean:
147147
# pin cross to a specific commit to avoid breaking changes
148148
.PHONY: install-cross install-k3d check-bins pod-status-check setup
149149
install-cross:
150-
@if [ -z $$(which cross) ]; then cargo install cross --git https://github.com/cross-rs/cross --rev 5896ed1359642510855ca9ee50ce7fdf75c50e3c; fi
151-
@cross -V 2>/dev/null | grep 5896ed1 || echo "WARN: unsupported version of cross found. Building containerd-shim-spin requires specific version of cross.\n\nPlease uninstall and run make install-cross to install the supported version."
150+
@if [ -z $$(which cross) ]; then RUSTFLAGS="-A warnings" cargo install cross --git https://github.com/cross-rs/cross --rev 49338b18fdb82dedb2a813664e2e565ca73e2047; fi
151+
@cross -V 2>/dev/null | grep 49338b1 || echo "WARN: unsupported version of cross found. Building containerd-shim-spin requires specific version of cross.\n\nPlease uninstall and run make install-cross to install the supported version."
152152

153153
install-k3d:
154154
wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash

containerd-shim-spin/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Containerd shim for running Spin workloads.
1111
"""
1212

1313
[dependencies]
14-
containerd-shim-wasm = { version ="0.9.0", default-features = false, features = ["opentelemetry"]}
14+
containerd-shim-wasm = { version ="0.10.0", default-features = false, features = ["opentelemetry"]}
1515
http = "1"
1616
log = "0.4"
1717
spin-app = { git = "https://github.com/fermyon/spin", tag = "v3.1.2" }

containerd-shim-spin/quickstart.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ Navigate to the directory where you created the application:
8686
cd qs-wasm-spin
8787
```
8888

89-
Use `rustup` to install the `wasm32-wasi` target and `spin build` to build the application. For example:
89+
Use `rustup` to install the `wasm32-wasip1` target and `spin build` to build the application. For example:
9090

9191
```bash
92-
rustup target add wasm32-wasi
92+
rustup target add wasm32-wasip1
9393
spin build
9494
```
9595

@@ -131,13 +131,13 @@ You have two choices for publishing spin apps. The steps to deploy are the same
131131
Create a `Dockerfile` at the root of the application directory with the following:
132132

133133
```dockerfile
134-
FROM --platform=${BUILDPLATFORM} rust:1.71 AS build
134+
FROM --platform=${BUILDPLATFORM} rust:1.85 AS build
135135
WORKDIR /opt/build
136136
COPY . .
137-
RUN rustup target add wasm32-wasi && cargo build --target wasm32-wasi --release
137+
RUN rustup target add wasm32-wasip1 && cargo build --target wasm32-wasip1 --release
138138

139139
FROM scratch
140-
COPY --from=build /opt/build/target/wasm32-wasi/release/qs_wasm_spin.wasm .
140+
COPY --from=build /opt/build/target/wasm32-wasip1/release/qs_wasm_spin.wasm .
141141
COPY --from=build /opt/build/spin.toml .
142142
```
143143

@@ -153,7 +153,7 @@ source = "qs_wasm_spin.wasm"
153153
Use `docker` to build the container image and push it to the k3d registry:
154154

155155
```bash
156-
docker buildx build --platform=wasi/wasm -t localhost:12345/qs-wasm-spin .
156+
docker buildx build --platform=wasip1/wasm -t localhost:12345/qs-wasm-spin .
157157
docker push localhost:12345/qs-wasm-spin:latest
158158
```
159159

images/spin-dapr/.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ target/debug
22
target/release
33
target/wasm32-wasi/build
44
target/wasm32-wasi/deps
5+
target/wasm32-wasip1/build
6+
target/wasm32-wasip1/deps
57
.spin/

images/spin-dapr/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM scratch
22
COPY ./spin.toml .
3-
COPY --chmod=0755 ./target/wasm32-wasi/release/spin_dapr.wasm /target/wasm32-wasi/release/spin_dapr.wasm
4-
ENTRYPOINT ["/target/wasm32-wasi/release/spin_dapr.wasm"]
3+
COPY --chmod=0755 ./target/wasm32-wasip1/release/spin_dapr.wasm /target/wasm32-wasip1/release/spin_dapr.wasm
4+
ENTRYPOINT ["/target/wasm32-wasip1/release/spin_dapr.wasm"]

images/spin-dapr/spin.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ version = "0.1.0"
77

88
[[component]]
99
id = "spin-dapr"
10-
source = "target/wasm32-wasi/release/spin_dapr.wasm"
10+
source = "target/wasm32-wasip1/release/spin_dapr.wasm"
1111
allowed_http_hosts = []
1212
[component.trigger]
1313
route = "/..."
1414

1515
[component.build]
16-
command = "cargo build --target wasm32-wasi --release"
16+
command = "cargo build --target wasm32-wasip1 --release"
1717
watch = ["src/**/*.rs", "Cargo.toml"]

images/spin-keyvalue/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM --platform=${BUILDPLATFORM} rust:1.71 AS build
1+
FROM --platform=${BUILDPLATFORM} rust:1.85 AS build
22
WORKDIR /opt/build
33
COPY . .
4-
RUN rustup target add wasm32-wasi && cargo build --target wasm32-wasi --release
4+
RUN rustup target add wasm32-wasip1 && cargo build --target wasm32-wasip1 --release
55

66
FROM scratch
77
COPY --from=build /opt/build/spin.toml ./spin.toml
8-
COPY --from=build /opt/build/target/wasm32-wasi/release/spin_keyvalue.wasm ./target/wasm32-wasi/release/spin_keyvalue.wasm
8+
COPY --from=build /opt/build/target/wasm32-wasip1/release/spin_keyvalue.wasm ./target/wasm32-wasip1/release/spin_keyvalue.wasm

images/spin-keyvalue/spin.toml

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

1313
[component.keyvalue]
14-
source = "target/wasm32-wasi/release/spin_keyvalue.wasm"
14+
source = "target/wasm32-wasip1/release/spin_keyvalue.wasm"
1515
allowed_http_hosts = []
1616
key_value_stores = ["foo"]
1717

1818
[component.keyvalue.build]
19-
command = "cargo build --target wasm32-wasi --release"
19+
command = "cargo build --target wasm32-wasip1 --release"
2020
watch = ["src/**/*.rs", "Cargo.toml"]

0 commit comments

Comments
 (0)