Skip to content

Commit bdd3952

Browse files
committed
Revert jumping ahead to WASI 0.2 until it can be run successfully locally
1 parent 8dd3736 commit bdd3952

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV WASI_SDK_VERSION=20
66
ENV WASI_SDK_PATH=/opt/wasi-sdk
77

88
ENV WASMTIME_HOME=/opt/wasmtime
9-
ENV WASMTIME_VERSION=18.0.2
9+
ENV WASMTIME_VERSION=14.0.4
1010
ENV WASMTIME_CPU_ARCH=x86_64
1111

1212
RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,clang,curl,git,ln,tar,xz} 'dnf-command(builddep)' && \

Tools/wasm/wasi.py

+12-17
Original file line numberDiff line numberDiff line change
@@ -277,23 +277,18 @@ def clean_contents(context):
277277

278278

279279
def main():
280-
host_runner_parts = [
281-
f"{shutil.which('wasmtime')} run",
282-
# Make sure the stack size will work for a pydebug
283-
# build.
284-
# The 8388608 value comes from `ulimit -s` under Linux
285-
# which equates to 8291 KiB.
286-
"--wasm max-wasm-stack=8388608",
287-
# Enable thread support.
288-
#"--wasm threads=y --wasi threads=y "
289-
# Use WASI 0.2 primitives
290-
"--wasi preview2",
291-
# Map the checkout to / to load the stdlib from /Lib.
292-
"--dir {HOST_DIR}::{GUEST_DIR}",
293-
# Set PYTHONPATH to the sysconfig data.
294-
"--env {ENV_VAR_NAME}={ENV_VAR_VALUE}"
295-
]
296-
default_host_runner = " ".join(host_runner_parts)
280+
default_host_runner = (f"{shutil.which('wasmtime')} run "
281+
# Make sure the stack size will work for a pydebug
282+
# build.
283+
# The 8388608 value comes from `ulimit -s` under Linux
284+
# which equates to 8291 KiB.
285+
"--wasm max-wasm-stack=8388608 "
286+
# Enable thread support.
287+
"--wasm threads=y --wasi threads=y "
288+
# Map the checkout to / to load the stdlib from /Lib.
289+
"--dir {HOST_DIR}::{GUEST_DIR} "
290+
# Set PYTHONPATH to the sysconfig data.
291+
"--env {ENV_VAR_NAME}={ENV_VAR_VALUE}")
297292

298293
parser = argparse.ArgumentParser()
299294
subcommands = parser.add_subparsers(dest="subcommand")

0 commit comments

Comments
 (0)