Commit Graph

1084 Commits

Author SHA1 Message Date
Sam Clegg
2b10b1bfc3 Use default python in PATH for circleci windows bot. NFC (#1609)
`C:\Python312\python.exe` is already in the path by default.

We no longer need to set this special path or environment variable. In
fact this code was doing nothing since it was adding the end of the PATH
so the system python was already coming first.
2025-10-03 15:34:43 -07:00
Joshua T.
44f11eac54 Build and push multi-platform docker image (#1567)
This PR adds the `publish-docker-image-multiplatform` CI job step that
pushes a multi-platform docker image when a new tag is created. #1211

Unfortunately, this is not as simple as pushing two images targeting
different platforms to the same tag. There are a couple of ways to
create a multi-platform image:
- Using `docker buildx` to build images for all platforms. To do this
images targeting non-native platforms would need to be built using QEMU
(slower), a remote machine or cross-compilation.
- Building and publishing platform-specific images
`emscripten/emsdk-x64`, `emscripten/emsdk-arm64` and then creating a
manifest that links to these images. This is the simpler solution to
implement, and is what this PR does.

Tested with CircleCI on my fork. See the pushed images at
[radiantly/emsdk ·
DockerHub](https://hub.docker.com/r/radiantly/emsdk/tags)
2025-09-25 10:51:45 -07:00
emscripten-bot
389a68bc35 Release 4.0.15 (#1602)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/b412b6307e541b93dd93f01b61181e15c17302ec
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/33ad7cf09d14176b582d2c7d91d00ce433d0c753
(asserts)
2025-09-16 23:09:04 -07:00
emscripten-bot
eff90ca04a Release 4.0.14 (#1599)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/4658718c188782acc67a249d45fce2d891ee3cc1
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/2f390179239fa46b7a22d25fc3afa4d76590510a
(asserts)
2025-09-02 23:24:36 +00:00
juj
1ded1a9d4a Add Node.js 24.7.0 support. (#1597)
This PR updates Node.js from earlier 22.16.0 to newer 24.7.0.

Remove armv7l and 32-bit Windows,
https://github.com/nodejs/nodejs.org/issues/8123
2025-09-03 00:41:18 +03:00
juj
b71731aa1a Pin Apple ARM64 Node Nightly (#1596)
Node.js Apple ARM64 nightly downloads are currently out of order, so pin
to recent version that does still exist.
https://github.com/nodejs/node/issues/59654
2025-08-27 21:17:04 +00:00
juj
5899439ff2 Add support for a new command 'emsdk deactivate' (#1593)
Add support for a new command 'emsdk deactivate' that can be used to
remove a tool from the active list.

Since the big endian cross compile Node.js is added to `NODE_JS_TEST`
instead of `NODE_JS`, there needs to be a way to deactivate it for
regular runs.

This PR adds a `emsdk deactivate` command to enable doing that.
2025-08-27 11:41:47 -07:00
juj
0674b46e36 Fix node nightly check when no node.js versions are installed (#1594)
This line failed when there are no Node.js's installed at all.
2025-08-27 19:57:16 +03:00
juj
efd71e9a2e Nightly Node.js and Big Endian cross compilation Node.js (#1590)
This PR adds support for

`./emsdk install node-nightly-64bit`

which finds the latest nightly node.js version and installs that. It is
a moving target, so the next day when a new nightly is produced,
reissuing `./emsdk install node-nightly-64bit` will install the newer
published version.

Also, this PR adds a fixed 22.18.0 version for the cross compilation
s390x Node.js target as well. On an x64 Linux system, this allows
running

`./emsdk install node-big-endian-crosscompile-22.16.0-64bit`

to install the big endian Node.js. This greatly simplifies the steps at
https://github.com/emscripten-core/emscripten/compare/main...juj:emscripten:bigendian_test_suite#diff-c36b90121be240017fa490a1c00e63e47fa3235f5c1be0593e2b7502d017c778R9985-R10000
and enables a trivial way to switch between LE and BE Node.js versions
for testing.

CC @slavek-kucera
2025-08-27 16:24:20 +03:00
juj
0c45297475 Allow switching between overrides (#1588)
Previously, if one used e.g. command

```
emsdk install --override-repository emscripten-main-64bit@https://github.com/juj/emscripten/tree/my_own_emscripten_branch emscripten-main-64bit
```

then the overridden installation would create a git clone from
`juj/emscripten`, and that clone would be located under the default
remote name `origin`.

This would prevent being able to switch between overrides on subsequent
`emsdk install` commands. I.e. it would then not be possible to later do
a default

```
emsdk install emscripten-main-64bit
```

command without an override, since the remote name `origin` would point
to `juj/emscripten` instead of `emscripten-core/emscripten`.

This PR changes the naming scheme of `git clone`s when
`--override-repository` is used, to name the clones with remote names
from the override, so in the above case, the clone would appear under
remote name `juj` and not `origin`.

This enables flipping between multiple `emsdk install` commands in the
same checkout, without needing to nuke the installed directory in
between.

This enables me to run experiments like
github.com/emscripten-core/emscripten/pull/25025 locally on my CI,
without needing to merge them upstream to become available.
2025-08-27 14:59:01 +03:00
Sam Clegg
8ad0ba0b36 [CI] Re-enable python2 flake8 checking (#1591)
This was accidentally removed in #1183
2025-08-26 14:36:32 -07:00
Sam Clegg
833fa33421 [emsdk] Remove references to old output files such as .worker.js. NFC (#1585)
Fixes: #1584
2025-08-19 12:56:30 -04:00
emscripten-bot
404dc1ec13 Release 4.0.13 (#1582)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/32b8ae819674cb42b8ac2191afeb9571e33ad5e2
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/17d4746128fd81d192c1685da52332c5221799bb
(asserts)
2025-08-14 20:41:34 +00:00
emscripten-bot
f39e849eff Release 4.0.12 (#1579)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/209b886304498eff50dd835850dc5715803401ed
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/a9e9ee083503b842a14d31db764e31d65afb8910
(asserts)

---------

Co-authored-by: Sam Clegg <sbc@chromium.org>
2025-08-01 17:34:28 +00:00
ZL
e062c54f43 Add bazel feature for wasm-exceptions (#1575)
This PR add bazel feature for `-fwasm-exceptions`

Part of #1400
2025-07-22 02:06:54 -04:00
emscripten-bot
d49219d03a Release 4.0.11 (#1572)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/7033fec38817ec01909b044ea0193ddd5057255c
(LTO)
https://chromium.googlesource.com/emscripten-releases/+/0eacb0d6
(asserts)

---------

Co-authored-by: Sam Clegg <sbc@chromium.org>
2025-07-14 17:23:27 +00:00
Sam Clegg
d845e506ce Fix python search path in emsdk launcher scripts (#1571)
The `-0` and `-1` suffixes here are not part of the install path which
only based on the `id` and `version` of the tool. e.g:

```
  {
    "id": "python",
    "version": "3.9.2",
    "bitness": 64,
    "arch": "x86_64",
    "windows_url": "python-3.9.2-1-embed-amd64+pywin32.zip",
    "activated_cfg": "PYTHON='%installation_dir%/python.exe'",
    "activated_env": "EMSDK_PYTHON=%installation_dir%/python.exe"
  },
```

Here we have a `-1` in the archive name, but that is not included in the
version which is used to construct the install path.

Fixes: #1570
2025-07-10 15:51:02 -07:00
emscripten-bot
62a853cd3b Release 4.0.10 (#1565)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/8103ffedfb0c42d231c6af6859a5a1a832260b43
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/ccf48a673362f11ddb6c3656405bb6a03b344052
(asserts)
2025-06-06 17:16:11 -07:00
juj
2d480a1b7c Update Node.js to LTS 22.16.0. (#1563)
This matches the minimum OS requirements set of macOS 11.0 and Windows
10:

https://github.com/nodejs/node/blob/v22.x/BUILDING.md#platform-list
2025-05-29 15:00:30 -07:00
juj
cfe7ccf163 Update python version note for Linux. (#1562) 2025-05-28 20:39:44 +00:00
juj
d07c793415 Update Python to 3.13.3 and add support to Windows on ARM64. (#1477)
Update Python to 3.13.0 and add support to Windows on AMD64. Rewrite
packaging of pywin32 because it is no longer shipped via separate binary
installers, but has migrated to use pip.
2025-05-28 23:20:03 +03:00
emscripten-bot
3bcf1dcd01 Release 4.0.9 (#1559)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/cb2a69bce627bd2247624c71fc12907cb8785d2f
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/27f1e0801c6ec5ea4d9a9e1d573eb1fead3525f1
(asserts)
2025-05-19 16:38:20 +00:00
emscripten-bot
419021fa04 Release 4.0.8 (#1556)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/56f86607aeb458086e72f23188789be2ee0e971a
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/ab275365d4057cf92d698ef99744d66cd8c7cba9
(asserts)
2025-04-30 23:22:38 +00:00
Sam Clegg
29cee8f46f Use raw string to avoid regex warning (#1552)
Followup to #1550
2025-04-15 16:51:03 -07:00
emscripten-bot
c69d433d85 Release 4.0.7 (#1549)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/ef4e9cedeac3332e4738087567552063f4f250d3
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/4bef8973dc12f5f38022f323d67c16237bbd2962
(asserts)
2025-04-15 21:55:59 +00:00
Sam Clegg
2e1e02e648 Don't build binaryen tests (#1551)
These seems to be some issue with building gtest on ubuntu/focal. Looks
like maybe the libstdc++ is too old for it.
2025-04-15 14:36:32 -07:00
Sam Clegg
0992ad5f5d Fix updating of MODULE.bazel in update_bazel_workspace.py (#1550)
The regex was not matching which caused #1549 to fail.
2025-04-15 14:13:21 -07:00
Conrad Burchert
ed2035a3cc Bazel: Migrate to bzlmod (#1530)
This migrates the bazel integration to the new Bazel dependency system
"bzlmod". bzlmod is becoming mandatory this year (see second sentence
here: https://bazel.build/external/migration).

This is a backwards incompatible migration, directly removing the old
WORKSPACE based approach. Users will have to change how they depend on
bzlmod, however I assume pretty much every user will be happy about it,
because they are forced to use bzlmod anyway or add extra flags to
continue to build with newer Bazel versions. Given that users normally
depend on specific git commits in the old system, they won't be hit with
this until they decide to upgrade emsdk.

The basic principle here is simple: I took everything that WORKSPACE did
and searched an alternative in bzlmod. Some interesting bits:

- We have less worries about multiple versions and people depending on
emscripten multiple times in different ways. This is resolved by the new
system: Bazel first iterates through the MODULE.bazel files recursively,
then finds the minimum version needed for each module and then executes
the module extensions that define repos exactly once at that version. So
no more ifs needed to detect multiple inclusions.
- A bunch of nodejs stuff moves to MODULE.bazel, because that is how the
nodejs module works now. As their module extension gets executed only
once you need to declare everything that you could need before that in
the MODULE.bazel file. A side effect of that is that we have to make a
fake repository when emscripten doesn't have an arm64 binary for linux,
because we can't actually figure that out in MODULE.bazel, so we have to
declare that it always exists and then create one in all cases.

There is a bunch of autoformatter changes in here as well, I could try
to revert them if you prefer.

Closes #1509
2025-04-09 14:38:12 -07:00
emscripten-bot
24fc909c0d Release 4.0.6 (#1542)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/14767574a5c37ff9526a253a65ddbe0811cb3667
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/4050eaf1fd8e1c191198ec4ba8c346c4f3da0dc8
(asserts)
2025-03-26 13:14:10 -07:00
Sam Clegg
7c8f0a2a3d Remove closure compile hack when running npm ci (#1541)
See
https://chromium.googlesource.com/emscripten-releases/+/2ee2f60605a7774b4e194c235e372c29973038ab
2025-03-25 12:39:52 -07:00
emscripten-bot
b665079cb9 Release 4.0.5 (#1536)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/d7f8ff5e2ca3539c33fae81e98f7c56ef9fa1239
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/71269375282224b2e662bbe009e2e3ebc40db67f
(asserts)
2025-03-12 17:52:59 +00:00
emscripten-bot
074211759c Release 4.0.4 (#1534)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/ea71afcf5a172125179a07ff1731de6e81c92222
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/5121692126f7c96d86a13dc8462e758813e30123
(asserts)
2025-02-25 15:21:30 -08:00
David Neil
49ccc1ddeb Do not mark cache generation as local (#1533)
local=True marks a repository rule to unconditionally re-execute anytime
bazel re-evaluates the workspace (almost every invocation) It works well
for processes that execute in <10ms, not large ones like the embuilder
cache generation.

I have tested this locally and it seems to work fine, but I'll be honest
that I don't understand the nuances of repository rules that well, nor
do I know much of anything about emscripten or the circumstances in
which the cache ought to be rebuilt.

I checked the `external/@emscripten_cache.marker` file that Bazel uses
to store the cache key for if it needs to re-evaluate, and changing any
of the options passed into register_emscripten_toolchains resulted in
the cache key changing, and it correctly resulted in the cache being
regenerated.

The big question I don't have the context to answer: are there files on
disk other than these two that need to be watched for changes, so the
repository rule should change if they change:
```
FILE:@@emscripten_bin_linux//BUILD.bazel
FILE:@@emsdk//emscripten_toolchain/default_config
```
2025-02-23 16:32:28 -05:00
Conrad Burchert
85390ce884 Bazel: Pass nodejs binary path as an environment variable. (#1518)
The current way to derive the binary path relies on a specific name for
the nodejs repository. This blocks migrating to bzlmod, as bzlmod
prefixes repository directories with the module name that created them.
By asking bazel for the path instead we always get the correct path, so
we can work with both bzlmod and WORKSPACE based dependencies at the
same time.

The repository @nodejs, used in the build label, refers to nodejs for
the host platform and is generated by the following macro (wasn't too
obvious to me):

d19d695275/nodejs/repositories.bzl (L452)

This is some work towards solving #1509.
2025-02-12 13:51:50 -05:00
Derek Schuff
580895a422 create-release.yml: Use version number in branch name (#1522) 2025-02-07 18:44:20 +00:00
emscripten-bot
127ce42cd5 Release 4.0.3 (#1521)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/de2109f0e5e7278d470da11de526aed16c527722
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/bae6703fb819bd84fb4dfb5e87b41cf93b6d3f2b
(asserts)
2025-02-07 18:10:18 +00:00
emscripten-bot
539e4044b7 Release 4.0.2 (#1516)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/cc8eba40de8235f9c33d92463018f87b3edaa09e
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/dc575ac9a214463b2b3503c11a1a31db665b4414
(asserts)

---------

Co-authored-by: Sam Clegg <sbc@chromium.org>
2025-01-30 00:52:18 +00:00
emscripten-bot
9dbdc4b343 Release 4.0.1 (#1510)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/5ff495a591978fdf8a16f2d172be3616f3150d1e
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/c2e46b78d3dde701187d685f8c175f17425bee68
(asserts)
2025-01-17 00:18:50 +00:00
Derek Schuff
9853a6bfe6 4.0.0 (#1513)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/3ebc04a3dab24522a5bf8ced3ce3caea816558f6
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/912ac2d711bb343205f314564ed287d883a7d888
(asserts)
2025-01-14 01:18:45 +00:00
Derek Schuff
1f00f5dfe9 Allow overriding version number in create_release.py (#1512)
This changes the CLI syntax for create_relase.py to be more compatible
with
argparse, but we don't run it often manually anyway.
2025-01-13 16:23:25 -08:00
walkingeyerobot
0e594bc6c7 Update node for bazel (#1511)
hopefully this unblocks the release?
2025-01-13 18:49:34 -05:00
walkingeyerobot
ce1d281ce6 Fix bazel ci (#1504)
This is a temporary fix until I can do
https://bazel.build/external/migration
2024-12-14 02:39:55 +00:00
emscripten-bot
3d6d8ee910 Release 3.1.74 (#1502)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/c2655005234810c7c42e02a18e4696554abe0352
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/88e95307accc1f4b247b86b7a0c0e6beaf07f844
(asserts)
2024-12-13 18:10:21 -08:00
Christian Clauss
095c488961 Python lint: Use flake8 --extend-ignore instead of --ignore (#1498) 2024-12-06 15:20:31 -08:00
Christian Clauss
b644e2e6bb Python lint: Upgrade to flake8=7.1.1 (#1497) 2024-12-06 11:20:43 -08:00
Christian Clauss
ac2adfeac4 Fix typos discovered by codespell (#1496)
# https://pypi.org/project/codespell
% `codespell`
```
./emsdk.py:1459: thier ==> their
./test/test.bat:1: equivilent ==> equivalent
./test/test.py:198: Specificlly ==> Specifically
./scripts/update_bazel_workspace.py:2: revisons ==> revisions
./scripts/update_node.py:11: direcotry ==> directory
./bazel/emscripten_toolchain/BUILD.bazel:57: implictly ==> implicitly
./docker/Dockerfile:87: terninal ==> terminal
```
2024-12-06 09:26:36 -08:00
Eric Higgins
c7d78534d2 bazel: update rules_nodejs and migrate to rules_js (#1436)
This finishes the work started in
https://github.com/emscripten-core/emsdk/pull/1388 by fixing CI. It
avoids a breaking change by:
* Using the latest rules_js 1.x.x version, instead of updating to
rules_js 2 (which removes support for bazel 5).
* Copying the contents of
[rules_js_dependencies](https://github.com/aspect-build/rules_js/blob/main/js/repositories.bzl)
instead of calling it, as the call would need to be added by users in
their `WORKSPACE` files

Context from the previous PR:

> Bazel's Node.js dependency comes from
[rules_nodejs](https://github.com/bazelbuild/rules_nodejs/). Previously,
bazel/deps.bzl was using rules_nodejs 5.8.0, released in 2022 and only
supported Node.js toolchains up to 18.12.1.

> This PR bumps rules_nodejs to latest 6.1.1. It also replaces
build_bazel_rules_nodejs with
[rules_js](https://github.com/aspect-build/rules_js), since npm_install
that bazel/emscripten_deps.bzl used was deprecated. The README of
rules_nodejs now recommends migrating to rules_js for everything other
than the Node.js toolchain:
(371e8cab15)

> Impetus
Our repo builds with Bazel and uses Emscripten and Node.js. Tried to
upgrade Node.js 18 to Node.js 20 and saw that emsdk didn't support
rules_nodejs 6+ in the same workspace.

Similarly, it's not possible to update to rules_js v2 in a workspace
that also references `emsdk`.
2024-12-05 02:59:04 -05:00
emscripten-bot
6abe5123c3 Release 3.1.73 (#1492)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/b363a836e75a245c548b7a6a021822d8c9e4c6df
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/86f3e54628089634c6b73039955388296e920291
(asserts)
2024-11-28 01:32:35 +00:00
Derek Schuff
cbbb7f359a Enable auto-merge for bot-created PRs (#1490)
This still requires a human to review, but one less button to click.
2024-11-19 11:32:28 -08:00
emscripten-bot
75eb9522ae Release 3.1.72 (#1489)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/7a360458327cd24c2a7aab428bdbcb5bca8810e4
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/92d39398c0016e73821548a4cd9df3df1358f6d9
(asserts)
2024-11-19 01:07:33 +00:00