Skip to content

Commit 1fbf576

Browse files
authored
Symlink /opt/wasi-sdk instead of directly unpacking to it (#51)
This is to use the `latest` label in the CPython repo thanks to `Toosl/wasm/wasi` looking for unpacked WASI SDK installs in Python 3.15 and 3.14. Also bump the version of wasmtime while we are here.
1 parent 281d19d commit 1fbf576

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

devcontainer/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ ARG TARGETARCH
1010

1111
ENV CC=clang
1212

13-
# Remove a video codec repository to speed up installs
13+
# Remove a video codec repository to speed up installs.
1414
RUN dnf config-manager setopt fedora-cisco-openh264.enabled=False
1515

1616
# Update only after consulting with WASI support maintainers (see PEP 11).
1717
ENV WASI_SDK_VERSION=24
18-
ENV WASI_SDK_PATH=/opt/wasi-sdk
1918

2019
# Update as desired.
21-
ENV WASMTIME_VERSION=33.0.0
20+
ENV WASMTIME_VERSION=35.0.0
2221
ENV WASMTIME_HOME=/opt/wasmtime
2322

2423

devcontainer/install-wasi.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# Install the WASI SDK.
44
# This should be portable to any Linux, but is only tested in the devcontainer.
55

6-
7-
mkdir ${WASI_SDK_PATH}
8-
96
case "${TARGETARCH}" in
107
amd64) WASI_ARCH="x86_64" ;;
118
arm64) WASI_ARCH="arm64" ;;
@@ -14,7 +11,10 @@ esac && \
1411

1512
URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-${WASI_ARCH}-linux.tar.gz
1613

17-
curl --location $URL | tar --strip-components 1 --directory ${WASI_SDK_PATH} --extract --gunzip
14+
curl --location $URL | tar --directory /opt --extract --gunzip
15+
16+
# For Python 3.13 as Tools/wasm/wasi.py expects /opt/wasi-sdk.
17+
ln -s /opt/wasi-sdk-${WASI_SDK_VERSION}.0*/ /opt/wasi-sdk
1818

1919

2020
mkdir --parents ${WASMTIME_HOME}

0 commit comments

Comments
 (0)