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

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

Add script to automate WebAssembly builds #95853

tiran opened this issue Aug 10, 2022 · 0 comments
Labels
OS-wasi type-feature A feature request or enhancement

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 A feature request or enhancement 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 <[email protected]>
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 <[email protected]>
(cherry picked from commit 32ac98e)

Co-authored-by: Christian Heimes <[email protected]>
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
tiran added a commit to tiran/cpython that referenced this issue Aug 29, 2022
- pre-build Emscripten ports and system libraries
- check for broken EMSDK versions
- use EMSDK's node for wasm32-emscripten
- warn when PKG_CONFIG_PATH is set
- add support level information
tiran added a commit that referenced this issue Aug 30, 2022
- pre-build Emscripten ports and system libraries
- check for broken EMSDK versions
- use EMSDK's node for wasm32-emscripten
- warn when PKG_CONFIG_PATH is set
- add support level information
tiran added a commit to tiran/cpython that referenced this issue Sep 3, 2022
tiran added a commit to tiran/cpython that referenced this issue Sep 4, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
tiran added a commit to tiran/cpython that referenced this issue Sep 6, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
- add `make hostrunnertest`
tiran added a commit to tiran/cpython that referenced this issue Sep 6, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
- `test` and `hostrunnertest` now support custom testopts
tiran added a commit to tiran/cpython that referenced this issue Sep 6, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
- `test` and `hostrunnertest` now support custom testopts
tiran added a commit to tiran/cpython that referenced this issue Sep 6, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
- `test` and `hostrunnertest` now support custom testopts
tiran added a commit to tiran/cpython that referenced this issue Sep 6, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
- `test` and `hostrunnertest` now support custom testopts
tiran added a commit to tiran/cpython that referenced this issue Sep 8, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
- `test` and `hostrunnertest` now support custom testopts
tiran added a commit to tiran/cpython that referenced this issue Sep 8, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
- `test` and `hostrunnertest` now support custom testopts
tiran added a commit to tiran/cpython that referenced this issue Sep 8, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
- `test` and `hostrunnertest` now support custom testopts
tiran added a commit to tiran/cpython that referenced this issue Sep 8, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
- `test` and `hostrunnertest` now support custom testopts
tiran added a commit to tiran/cpython that referenced this issue Sep 10, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
- `test` and `hostrunnertest` now support custom testopts
tiran added a commit to tiran/cpython that referenced this issue Sep 10, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
- `test` and `hostrunnertest` now support custom testopts
tiran added a commit to tiran/cpython that referenced this issue Sep 10, 2022
- `wasm_build.py` now supports multiple operations.
- only `build` (default) performs auto-building
- new ops `configure` and `compile`.
- better help
- `repl` starts `wasm_webserver` and opens browser repl
- `test` and `hostrunnertest` now support custom testopts
tiran added a commit to tiran/cpython that referenced this issue Sep 11, 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 <[email protected]>
tiran added a commit to tiran/cpython that referenced this issue Sep 11, 2022
…ythonGH-96045)

- 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 to tiran/cpython that referenced this issue Sep 11, 2022
- pre-build Emscripten ports and system libraries
- check for broken EMSDK versions
- use EMSDK's node for wasm32-emscripten
- warn when PKG_CONFIG_PATH is set
- add support level information
tiran added a commit to tiran/cpython that referenced this issue Sep 12, 2022
tiran added a commit that referenced this issue Sep 13, 2022
GH-96045, GH-96389, GH-96744) (GH-96749)

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``.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-wasi type-feature A feature request or enhancement
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants