Skip to content

Commit 6734c60

Browse files
committed
Update wasmtime and add --argv0
1 parent 3412c9a commit 6734c60

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/reusable-wasi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-24.04
1616
timeout-minutes: 60
1717
env:
18-
WASMTIME_VERSION: 22.0.0
18+
WASMTIME_VERSION: 38.0.3
1919
WASI_SDK_VERSION: 24
2020
WASI_SDK_PATH: /opt/wasi-sdk
2121
CROSS_BUILD_PYTHON: cross-build/build

Tools/wasm/wasi/__main__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ def configure_wasi_python(context, working_dir):
329329
"ENV_VAR_NAME": "PYTHONPATH",
330330
"ENV_VAR_VALUE": f"/{sysconfig_data_dir}",
331331
"PYTHON_WASM": working_dir / "python.wasm",
332+
"ARGV0": wasi_build_dir / "python.wasm",
332333
}
333334
# Check dynamically for wasmtime in case it was specified manually via
334335
# `--host-runner`.
@@ -421,6 +422,8 @@ def main():
421422
"--wasm max-wasm-stack=16777216 "
422423
# Enable thread support; causes use of preview1.
423424
# "--wasm threads=y --wasi threads=y "
425+
# Explicitly set the argv[0] value
426+
"--argv0 {ARGV0} "
424427
# Map the checkout to / to load the stdlib from /Lib.
425428
"--dir {HOST_DIR}::{GUEST_DIR} "
426429
# Set PYTHONPATH to the sysconfig data.

0 commit comments

Comments
 (0)