Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4637a1f

Browse filesBrowse files
authored
[3.11] GH-116313: get WASI builds to run under wasmtime 18 w/ WASI 0.2/preview2 primitives (GH-116327) (GH-116373) (GH-116384)
(cherry picked from commit 88fdb08)
1 parent 8675e7f commit 4637a1f
Copy full SHA for 4637a1f

File tree

Expand file treeCollapse file tree

4 files changed

+7
-4
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+7
-4
lines changed
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Get WASI builds to work under wasmtime 18 w/ WASI 0.2/preview2 primitives.

‎Tools/wasm/wasm_build.py

Copy file name to clipboardExpand all lines: Tools/wasm/wasm_build.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,10 @@ def _check_wasi():
316316
# workaround for https://github.com/python/cpython/issues/95952
317317
"HOSTRUNNER": (
318318
"wasmtime run "
319-
"--env PYTHONPATH=/{relbuilddir}/build/lib.wasi-wasm32-{version}:/Lib "
320-
"--mapdir /::{srcdir} --"
319+
"--wasm max-wasm-stack=8388608 "
320+
"--wasi preview2 "
321+
"--dir {srcdir}::/ "
322+
"--env PYTHONPATH=/{relbuilddir}/build/lib.wasi-wasm32-{version}:/Lib"
321323
),
322324
"PATH": [WASI_SDK_PATH / "bin", os.environ["PATH"]],
323325
},

‎configure

Copy file name to clipboardExpand all lines: configure
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎configure.ac

Copy file name to clipboardExpand all lines: configure.ac
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ then
15801580
dnl TODO: support other WASI runtimes
15811581
dnl wasmtime starts the proces with "/" as CWD. For OOT builds add the
15821582
dnl directory containing _sysconfigdata to PYTHONPATH.
1583-
[WASI/*], [HOSTRUNNER='wasmtime run --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt) --mapdir /::$(srcdir) --'],
1583+
[WASI/*], [HOSTRUNNER='wasmtime run --wasm max-wasm-stack=8388608 --wasi preview2 --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/'],
15841584
[HOSTRUNNER='']
15851585
)
15861586
fi

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.