Skip to content

Commit

Permalink
gh-84461: Build Emscripten with WASM BigInt support (GH-94219)
Browse files Browse the repository at this point in the history
(cherry picked from commit e69306f)

Co-authored-by: Christian Heimes <christian@python.org>
  • Loading branch information
miss-islington and tiran authored Jun 24, 2022
1 parent 41e4b42 commit c966e08
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Tools/wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@ popd
```

```shell
node --experimental-wasm-threads --experimental-wasm-bulk-memory builddir/emscripten-node/python.js
node --experimental-wasm-threads --experimental-wasm-bulk-memory --experimental-wasm-bigint builddir/emscripten-node/python.js
```

(``--experimental-wasm-bigint`` is not needed with recent NodeJS versions)

# wasm32-emscripten limitations and issues

Emscripten before 3.1.8 has known bugs that can cause memory corruption and
Expand Down
2 changes: 2 additions & 0 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,9 @@ AS_CASE([$ac_sys_system],
dnl Start with 20 MB and allow to grow
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sALLOW_MEMORY_GROWTH -sTOTAL_MEMORY=20971520"])
dnl map int64_t and uint64_t to JS bigint
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sWASM_BIGINT"])
dnl Include file system support
AS_VAR_APPEND([LDFLAGS_NODIST], [" -sFORCE_FILESYSTEM -lidbfs.js -lnodefs.js -lproxyfs.js -lworkerfs.js"])
Expand Down

0 comments on commit c966e08

Please sign in to comment.