Skip to content

Commit e02f7c0

Browse files
committed
Move wasmtime details entirely into the install script
It should help with remembering to bump the wasmtime version when changing the WASI SDK.
1 parent 6616b14 commit e02f7c0

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

wasicontainer/Dockerfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ LABEL org.opencontainers.image.documentation="https://github.com/python/cpython-
1111

1212
ARG TARGETARCH
1313

14-
# WASI SDK versions are controlled in install-wasi.sh.
15-
ENV WASI_SDK_ROOT=/opt
16-
17-
ENV WASMTIME_VERSION=38.0.2
18-
ENV WASMTIME_HOME=/opt/wasmtime
19-
2014
RUN mkdir -p /opt/cpython-devcontainer/bin
2115
COPY --chmod=755 install-wasi.sh /opt/cpython-devcontainer/bin/
2216

wasicontainer/install-wasi.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
#! /bin/bash -ex
22

3+
WASI_SDK_VERSIONS=(
4+
# 16 for 3.11 & 3.12 is special-cased below.
5+
24 # 3.13 (w/ special symlinking below), 3.14
6+
29 # 3.15
7+
)
8+
WASMTIME_VERSION="38.0.4"
9+
10+
ENV WASI_SDK_ROOT=/opt
11+
312
mkdir --parents ${WASI_SDK_ROOT}
413

514
# For 3.11, 3.12.
@@ -15,10 +24,6 @@ case "${TARGETARCH}" in
1524
*) echo "Unsupported TARGETARCH: ${TARGETARCH}" && exit 1 ;;
1625
esac && \
1726

18-
WASI_SDK_VERSIONS=(
19-
24 # 3.13, 3.14
20-
29 # 3.15
21-
)
2227
for VERSION in "${WASI_SDK_VERSIONS[@]}"; do
2328
# The URL format only works for WASI SDK >= 23.
2429
URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${VERSION}/wasi-sdk-${VERSION}.0-${WASI_ARCH}-linux.tar.gz
@@ -28,6 +33,7 @@ done
2833
# For Python 3.13 as Tools/wasm/wasi.py expects /opt/wasi-sdk by default.
2934
ln -s ${WASI_SDK_ROOT}/wasi-sdk-24.0*/ /opt/wasi-sdk
3035

36+
WASMTIME_HOME="/opt/wasmtime"
3137

3238
mkdir --parents ${WASMTIME_HOME}
3339

0 commit comments

Comments
 (0)