Skip to content

Commit c966e08

Browse files
gh-84461: Build Emscripten with WASM BigInt support (GH-94219)
(cherry picked from commit e69306f) Co-authored-by: Christian Heimes <christian@python.org>
1 parent 41e4b42 commit c966e08

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Tools/wasm/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,11 @@ popd
9898
```
9999

100100
```shell
101-
node --experimental-wasm-threads --experimental-wasm-bulk-memory builddir/emscripten-node/python.js
101+
node --experimental-wasm-threads --experimental-wasm-bulk-memory --experimental-wasm-bigint builddir/emscripten-node/python.js
102102
```
103103

104+
(``--experimental-wasm-bigint`` is not needed with recent NodeJS versions)
105+
104106
# wasm32-emscripten limitations and issues
105107

106108
Emscripten before 3.1.8 has known bugs that can cause memory corruption and

configure

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+3
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,9 @@ AS_CASE([$ac_sys_system],
20282028
dnl Start with 20 MB and allow to grow
20292029
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sALLOW_MEMORY_GROWTH -sTOTAL_MEMORY=20971520"])
20302030
2031+
dnl map int64_t and uint64_t to JS bigint
2032+
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sWASM_BIGINT"])
2033+
20312034
dnl Include file system support
20322035
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sFORCE_FILESYSTEM -lidbfs.js -lnodefs.js -lproxyfs.js -lworkerfs.js"])
20332036

0 commit comments

Comments
 (0)