Eventually wasm32-wasi will represent WASI 1.0, and so it's currently deprecated so it can be used for that eventual purpose. wasm32-wasip1 is also more specific to what version of WASI is currently supported.
---------
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
WASI_SDK_VERSION: 24
WASI_SDK_PATH: /opt/wasi-sdk
CROSS_BUILD_PYTHON: cross-build/build
- CROSS_BUILD_WASI: cross-build/wasm32-wasi
+ CROSS_BUILD_WASI: cross-build/wasm32-wasip1
steps:
- uses: actions/checkout@v4
# No problem resolver registered as one doesn't currently exist for Clang.
with:
path: ${{ env.WASI_SDK_PATH }}
key: ${{ runner.os }}-wasi-sdk-${{ env.WASI_SDK_VERSION }}
- - name: "Install WASI SDK"
+ - name: "Install WASI SDK" # Hard-coded to x64.
if: steps.cache-wasi-sdk.outputs.cache-hit != 'true'
run: |
mkdir ${{ env.WASI_SDK_PATH }} && \
--- /dev/null
+Use ``wasm32-wasip1`` as the target triple for WASI instead of
+``wasm32-wasi``. The latter will eventually be reclaimed for WASI 1.0 while
+CPython currently only supports WASI preview1.
"(default designed for wasmtime 14 or newer: "
f"`{default_host_runner}`)")
for subcommand in build, configure_host, make_host:
- subcommand.add_argument("--host-triple", action="store", default="wasm32-wasi",
+ subcommand.add_argument("--host-triple", action="store", default="wasm32-wasip1",
help="The target triple for the WASI host build")
context = parser.parse_args()
*-*-emscripten)
ac_sys_system=Emscripten
;;
- *-*-wasi)
+ *-*-wasi*)
ac_sys_system=WASI
;;
*)
PY_SUPPORT_TIER=2 ;; #(
powerpc64le-*-linux-gnu/gcc) :
PY_SUPPORT_TIER=2 ;; #(
- wasm32-unknown-wasi/clang) :
+ wasm32-unknown-wasip1/clang) :
PY_SUPPORT_TIER=2 ;; #(
x86_64-*-linux-gnu/clang) :
PY_SUPPORT_TIER=2 ;; #(
fi
;; #(
WASI/*) :
- HOSTRUNNER='wasmtime run --wasm max-wasm-stack=16777216 --wasi preview2 --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/' ;; #(
+ HOSTRUNNER='wasmtime run --wasm max-wasm-stack=16777216 --wasi preview2=n --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/' ;; #(
*) :
HOSTRUNNER=''
;;
*-*-emscripten)
ac_sys_system=Emscripten
;;
- *-*-wasi)
+ *-*-wasi*)
ac_sys_system=WASI
;;
*)
[aarch64-*-linux-gnu/gcc], [PY_SUPPORT_TIER=2], dnl Linux ARM64, glibc, gcc+clang
[aarch64-*-linux-gnu/clang], [PY_SUPPORT_TIER=2],
[powerpc64le-*-linux-gnu/gcc], [PY_SUPPORT_TIER=2], dnl Linux on PPC64 little endian, glibc, gcc
- [wasm32-unknown-wasi/clang], [PY_SUPPORT_TIER=2], dnl WebAssembly System Interface, clang
+ [wasm32-unknown-wasip1/clang], [PY_SUPPORT_TIER=2], dnl WebAssembly System Interface preview1, clang
[x86_64-*-linux-gnu/clang], [PY_SUPPORT_TIER=2], dnl Linux on AMD64, any vendor, glibc, clang
[aarch64-pc-windows-msvc/msvc], [PY_SUPPORT_TIER=3], dnl Windows ARM64, MSVC
dnl TODO: support other WASI runtimes
dnl wasmtime starts the process with "/" as CWD. For OOT builds add the
dnl directory containing _sysconfigdata to PYTHONPATH.
- [WASI/*], [HOSTRUNNER='wasmtime run --wasm max-wasm-stack=16777216 --wasi preview2 --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/'],
+ [WASI/*], [HOSTRUNNER='wasmtime run --wasm max-wasm-stack=16777216 --wasi preview2=n --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/'],
[HOSTRUNNER='']
)
fi