Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to automate WebAssembly builds #95853

Open
tiran opened this issue Aug 10, 2022 · 0 comments
Open

Add script to automate WebAssembly builds #95853

tiran opened this issue Aug 10, 2022 · 0 comments
Labels
type-feature

Comments

@tiran
Copy link
Member

tiran commented Aug 10, 2022

Feature or enhancement

I propose to add a tool that automates WebAssembly builds and guides developers through installation process of SDKs.

Pitch

It is not trivial to build Python on WebAssembly platforms. Developers have to install the correct SDKs, active them or set env vars. They also have to build a build Python interpreter before they can compile Python to WASM. Each variant requires wrappers for configure and make and several configure arguments.

I'm going to automate the steps with a Python script. The script features several build profiles and can run tests, too.

  $ ./Tools/wasm/wasm_builder.py emscripten-browser compile
  $ ./Tools/wasm/wasm_builder.py emscripten-node-dl test
  $ ./Tools/wasm/wasm_builder.py wasi test
@tiran tiran added the type-feature label Aug 10, 2022
tiran added a commit that referenced this issue Aug 13, 2022
Automate WASM build with a new Python script. The script provides
several build profiles with configure flags for Emscripten flavors
and WASI. The script can detect and use Emscripten SDK and WASI SDK from
default locations or env vars.

``configure`` now detects Node arguments and creates HOSTRUNNER
arguments for Node 16. It also sets correct arguments for
``wasm64-emscripten``.

Co-authored-by: Brett Cannon <brett@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 13, 2022
Automate WASM build with a new Python script. The script provides
several build profiles with configure flags for Emscripten flavors
and WASI. The script can detect and use Emscripten SDK and WASI SDK from
default locations or env vars.

``configure`` now detects Node arguments and creates HOSTRUNNER
arguments for Node 16. It also sets correct arguments for
``wasm64-emscripten``.

Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit 32ac98e)

Co-authored-by: Christian Heimes <christian@python.org>
tiran added a commit to tiran/cpython that referenced this issue Aug 14, 2022
- pyexpat.c: readinst(): Use correct format char for int.
- Add workaround for Emscripten timezone issue with calculating tm_yday.
- Skip a decimal test that allocates a lot of memory. It sometimes fails
  on Emscripten.
tiran added a commit to tiran/cpython that referenced this issue Aug 14, 2022
- pyexpat.c: readinst(): Use correct format char for int.
- Add workaround for Emscripten timezone issue with calculating tm_yday.
- Skip a decimal test that allocates a lot of memory. It sometimes fails
  on Emscripten.
tiran added a commit to tiran/cpython that referenced this issue Aug 18, 2022
- support EMSDK tot-upstream and git releases
- allow WASM assents for wasm64-emscripten and WASI. This makes single
  file distributions on WASI easier.
- decouple WASM assets from browser builds
tiran added a commit that referenced this issue Aug 19, 2022
- support EMSDK tot-upstream and git releases
- allow WASM assents for wasm64-emscripten and WASI. This makes single file distributions on WASI easier.
- decouple WASM assets from browser builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature
Projects
None yet
Development

No branches or pull requests

1 participant