Skip to content

Commit 2dfb93d

Browse files
committed
Merge branch 'main' into wasmfs-noderawfs-abspath
2 parents b006abd + 22383d7 commit 2dfb93d

342 files changed

Lines changed: 120977 additions & 2800 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ commands:
363363
- upload-test-results
364364
setup-macos:
365365
steps:
366-
- macos/install-rosetta
367366
- run:
368367
name: Install brew package dependencies
369368
environment:
@@ -1101,11 +1100,6 @@ jobs:
11011100
test_targets: "browser64_4gb skip:browser64_4gb.test_mainScriptUrlOrBlob*"
11021101
test-browser-firefox:
11031102
executor: ubuntu-lts
1104-
environment:
1105-
# Deserializing a growable SharedArrayBuffer is currently broken in Firefox.
1106-
# See: https://github.com/emscripten-core/emscripten/issues/27118
1107-
# See: https://bugzilla.mozilla.org/show_bug.cgi?id=2021136
1108-
EMTEST_LACKS_GROWABLE_ARRAYBUFFERS: "1"
11091103
steps:
11101104
- prepare-for-tests
11111105
- run-tests-firefox:
@@ -1270,6 +1264,7 @@ jobs:
12701264
EMTEST_SKIP_WASM64: "1"
12711265
EMTEST_SKIP_SCONS: "1"
12721266
EMTEST_SKIP_RUST: "1"
1267+
EMTEST_SKIP_NODE_25: "1"
12731268
# Some native clang tests assume x86 clang (e.g. -sse2)
12741269
EMTEST_LACKS_NATIVE_CLANG: "1"
12751270
EMCC_SKIP_SANITY_CHECK: "1"

.github/ISSUE_TEMPLATE/feature_depreaction.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ assignees: ''
99

1010
Tracking issue for the deprecation and removal of <FEATURE>.
1111

12-
The process for deprecating and removing features from emscripten is laid out out in https://github.com/emscripten-core/emscripten/blob/main/docs/process.md#deprecating-settings-and-features.
12+
The process for deprecating and removing features from emscripten is laid out
13+
in https://github.com/emscripten-core/emscripten/blob/main/CONTRIBUTING.md#deprecating-settings-and-features.
1314

1415
At any point in the process we may decide to delay or abort the deprecation and close this issue.
1516

ChangeLog.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,37 @@ to browse the changes between the tags.
1818

1919
See docs/process.md for more on how version tagging works.
2020

21-
6.0.2 (in development)
21+
6.0.3 (in development)
2222
----------------------
23+
- Added support for compiling FMA intrinsics. All 32 FMA intrinsics are
24+
supported, with 256-bit variants emulated via two 128-bit operations. Pass
25+
``-msimd128 -mfma`` to enable. With ``-mrelaxed-simd -mfma``, Wasm relaxed
26+
SIMD FMA is used. (#27183)
27+
- New `AUTO_INIT` setting to opt an instance ES module (`MODULARIZE=instance` or
28+
`WASM_ESM_INTEGRATION`) into self-initialization via top-level await on import,
29+
rather than exporting a default `init` function. Since there is no
30+
init/moduleArg, module-level configuration is unavailable:
31+
`INCOMING_MODULE_JS_API` is disabled and passing a non-empty one is an error.
32+
- The async `poll()`/`select()` implementation was refactored onto a per-inode
33+
readiness wait-queue. As part of this, the (undocumented) `stream_ops.poll`
34+
FS-backend handler signature changed from `poll(stream, timeout)` to
35+
`poll(stream)` returning the current readiness mask; out-of-tree custom FS
36+
backends with a `poll` handler must update. (#27226)
37+
- compiler-rt and libunwind were updated to LLVM 22.1.8. (#27245, #27246)
38+
- `-fcoverage-mapping` is currently broken due to a mismatch between the version
39+
of LLVM used and the imported version of compiler-rt. We hope to fix this
40+
in the next release. (#27261)
41+
- The default value for `GROWABLE_ARRAYBUFFERS` was reverted to `0` since we
42+
found issues with Web API compatibility. (#27260)
43+
44+
6.0.2 - 07/01/26
45+
----------------
46+
- The `GROWABLE_ARRAYBUFFERS` setting now supports both `=1` (auto-detect and
47+
use the feature) and `=2` (unconditionally use the feature, avoiding the
48+
overhead in multi-threaded builds). It now defaults to `=1`, meaning the
49+
feature will be used when available. Note that this only affects programs
50+
that are built with `ALLOW_MEMORY_GROWTH`, which is not enabled by default.
51+
(#27096, #27212)
2352
- New `-sNODERAWSOCKETS` setting that backs the POSIX sockets API with real TCP
2453
(`node:net`) and UDP (`node:dgram`) sockets on Node.js, with no `ws`, proxy
2554
process, or pthreads required. Supports incoming and outgoing TCP, UDP, IPv6,
@@ -73,9 +102,6 @@ See docs/process.md for more on how version tagging works.
73102
run dependencies). This means that errors during startup (or during the
74103
`main()` function) will more often show up as unhandled promise rejections
75104
(`onunhandledreject`) rather than synchronous errors (`onerror`). (#27121)
76-
- The `GROWABLE_ARRAYBUFFERS` setting now support both `=1` (auto-detect and
77-
use the feature) and `=2` (unconditionally use the feature). The second mode
78-
is still useful for avoiding the overhead in multi-threaded builds. (#27096)
79105

80106
6.0.0 - 06/04/26
81107
----------------
@@ -101,7 +127,7 @@ See docs/process.md for more on how version tagging works.
101127
manually transpile the output of emscripten (e.g. using babel for JS and
102128
binaryen for wasm). (#26677)
103129
- musl libc updated from v1.2.5 to v1.2.6. (#26860)
104-
- libpng port updated from 1.6.55 to 1.6.58. (#26592 and #26983)
130+
- libpng port updated from 1.6.55 to 1.6.58. (#26592, #26983)
105131
- The `-m64` compiler flag is now honored, and works as an alias for
106132
`-sMEMORY64` and/or `--target=wasm64`. (#26765)
107133
- The autopersistence feature in IDBFS mount now supports registering a global
@@ -248,10 +274,9 @@ See docs/process.md for more on how version tagging works.
248274
inconsistent with JS and was not supported in browser devtools. We plan to
249275
provide this information using Scopes encoding later. (#26149)
250276
- compiler-rt, libcxx, libcxxabi, libunwind, and llvm-libc were updated to LLVM
251-
21.1.8. (#26036, #26045, #26058, and #26151)
277+
21.1.8. (#26036, #26045, #26058, #26151)
252278
- Calling pthread_create in a single-threaded build will now return ENOTSUP
253279
rather then EAGAIN. (#26105)
254-
- compiler-rt and libunwind were updated to LLVM 21.1.8. (#26036 and #26045)
255280
- A new `-sEXECUTABLE` setting was added which adds a #! line to the resulting
256281
JavaScript and makes it executable. This setting defaults to true when the
257282
output filename has no extension, or ends in `.out` (e.g. `a.out`) (#26085)
@@ -496,7 +521,7 @@ See docs/process.md for more on how version tagging works.
496521
example, when you run `pkg-config --list-all` or `pkg-config --cflags
497522
<portname>`. Bare in mind that the correct PKG_CONFIG_PATH needs to be set for
498523
this to work. One way to do this is to run `emmake pkg-config`. (#24426)
499-
- libcxx, libcxxabi, and compiler-rt were updated to LLVM 20.1.4. (#24346 and
524+
- libcxx, libcxxabi, and compiler-rt were updated to LLVM 20.1.4. (#24346,
500525
#24357)
501526
- Emscripten will not longer generate trampoline functions for Wasm exports
502527
prior to the module being instantiated. Storing a reference to a Wasm export
@@ -683,7 +708,7 @@ See docs/process.md for more on how version tagging works.
683708
new proposal by default yet. This option replaces the existing
684709
`-sWASM_EXNREF`, whose meaning was the opposite.
685710
- compiler-rt, libcxx, libcxxabi, and libunwind were updated to LLVM 19.1.6.
686-
(#22937, #22994, and #23294)
711+
(#22937, #22994, #23294)
687712
- The default Safari version targeted by Emscripten has been raised from 14.1
688713
to 15.0 (the `MIN_SAFARI_VERSION` setting) (#23312). This has several effects:
689714
- The Wasm nontrapping-fptoint feature is enabled by default. Clang will
@@ -932,7 +957,7 @@ See docs/process.md for more on how version tagging works.
932957
3.1.57 - 04/10/24
933958
-----------------
934959
- libcxx, libcxxabi, libunwind, and compiler-rt were updated to LLVM 18.1.2.
935-
(#21607, #21638, and #21663)
960+
(#21607, #21638, #21663)
936961
- musl libc updated from v1.2.4 to v1.2.5. (#21598)
937962
- In `MODULARIZE` mode we no longer export the module ready promise as `ready`.
938963
This was previously exposed on the Module for historical reasons even though
@@ -1013,8 +1038,7 @@ See docs/process.md for more on how version tagging works.
10131038
community and supported on a "best effort" basis. See
10141039
`tools/ports/contrib/README.md` for details.A first contrib port is
10151040
available via `--use-port=contrib.glfw3`: an emscripten port of glfw written
1016-
in C++ with many features like support for multiple windows. (#21244 and
1017-
#21276)
1041+
in C++ with many features like support for multiple windows. (#21244, #21276)
10181042
- Added concept of external ports which live outside emscripten and are
10191043
loaded on demand using the syntax `--use-port=/path/to/my_port.py` (#21316)
10201044
- `embuilder` can now build ports with options as well as external ports using
@@ -1122,7 +1146,7 @@ See docs/process.md for more on how version tagging works.
11221146
For those that would rather perform transpilation separately outside of
11231147
emscripten you can use the `-sPOLYFILL=0` setting. (#20700)
11241148
- libcxx, libcxxabi, libunwind, and compiler-rt were updated to LLVM 17.0.4.
1125-
(#20705, #20707, and #20708)
1149+
(#20705, #20707, #20708)
11261150
- Remove `BENCHMARK` setting. That has not been used by the benchmark suite for
11271151
some time now (at least not by default), and is much less useful these days
11281152
given lazy compilation in VMs (which makes it impossible to truly benchmark
@@ -1401,7 +1425,7 @@ See docs/process.md for more on how version tagging works.
14011425
- Added new linker option `-sEXCEPTION_STACK_TRACES` which will display a stack
14021426
trace when an uncaught exception occurs. This defaults to true when
14031427
`ASSERTIONS` is enabled. This option is mainly for the users who want only
1404-
exceptions' stack traces without turning `ASSERTIONS` on. (#18642 and #18535)
1428+
exceptions' stack traces without turning `ASSERTIONS` on. (#18642, #18535)
14051429
- `SUPPORT_LONGJMP`'s default value now depends on the exception mode. If Wasm
14061430
EH (`-fwasm-exceptions`) is used, it defaults to `wasm`, and if Emscripten EH
14071431
(`-sDISABLE_EXCEPTION_CATCHING=0`) is used or no exception support is used, it
@@ -1550,7 +1574,7 @@ See docs/process.md for more on how version tagging works.
15501574
3.1.24 - 10/11/22
15511575
-----------------
15521576
- In Wasm exception mode (`-fwasm-exceptions`), when `ASSERTIONS` is enabled,
1553-
uncaught exceptions will display stack traces and what() message. (#17979 and
1577+
uncaught exceptions will display stack traces and what() message. (#17979,
15541578
#18003)
15551579
- It is now possible to specify indirect dependencies on JS library functions
15561580
directly in C/C++ source code. For example, in the case of a EM_JS or EM_ASM
@@ -1859,7 +1883,7 @@ See docs/process.md for more on how version tagging works.
18591883
`-sDISABLE_EXCEPTION_CATCHING=0`). When using Wasm EH with Wasm SjLj, there is
18601884
one restriction that you cannot directly call `setjmp` within a `catch`
18611885
clause. (Calling another function that calls `setjmp` is fine.)
1862-
(#14976 and #16072)
1886+
(#14976, #16072)
18631887

18641888
3.1.2 - 01/20/2022
18651889
------------------
@@ -3866,7 +3890,7 @@ v1.36.6: 8/8/2016
38663890
- Fixed inconsistencies in fullscreen API signatures (#4310, #4318, #4379)
38673891
- Changed the behavior of Emscripten WebGL createContext() to not forcibly set
38683892
CSS style on created canvases, but let page customize the style themselves
3869-
(#3406, #4194 and #4350, #4355)
3893+
(#3406, #4194, #4350, #4355)
38703894
- Adjusted the reported GL_VERSION field to adapt to the OpenGL ES
38713895
specifications (#4345)
38723896
- Added support for GLES3 GL_MAJOR/MINOR_VERSION fields. (#4368)

README.md

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ GitHub CI status: [![CircleCI](https://circleci.com/gh/emscripten-core/emscripte
66

77
Chromium builder status: [emscripten-releases](https://ci.chromium.org/p/emscripten-releases)
88

9-
Overview
10-
--------
9+
10+
# Overview
1111

1212
Emscripten compiles C and C++ to [WebAssembly](https://webassembly.org/) using
1313
[LLVM](https://en.wikipedia.org/wiki/LLVM) and
@@ -26,8 +26,58 @@ While Emscripten mostly focuses on compiling C and C++ using
2626
compilers (for example, Rust has Emscripten integration, with the
2727
`wasm32-unknown-emscripten` target).
2828

29-
License
30-
-------
29+
30+
# Getting Started
31+
32+
For detailed instructions and tutorials, visit the [Emscripten Website](https://emscripten.org).
33+
34+
## Installation
35+
36+
There are two primary ways to install Emscripten:
37+
38+
1. **Using the Emscripten SDK (emsdk) (Recommended)**
39+
The easiest way to get started is by using the Emscripten SDK. Follow the instructions on the [downloads page](https://emscripten.org/docs/getting_started/downloads.html) to install it.
40+
41+
2. **From a Git Checkout (Manual Installation)**
42+
If you have cloned the repository from Git, you can install the dependencies manually and then run the bootstrap script:
43+
```bash
44+
./bootstrap.py
45+
```
46+
For more details, see the [developer guide](https://emscripten.org/docs/contributing/developers_guide.html).
47+
48+
## Using the compiler
49+
50+
Run `emcc` like you would `gcc` or `clang`:
51+
52+
```bash
53+
$ emcc hello.c -o hello.js
54+
$ node hello.js
55+
Hello, world!
56+
```
57+
58+
Emscripten will compile your code into a WebAssembly module along with a
59+
JavaScript file that can load and run it. You can then run the resulting
60+
JavaScript in your browser or under [Node.js](https://nodejs.org/) (or
61+
[Deno](https://deno.com/) or [Bun](https://bun.sh/)).
62+
63+
Emscripten can also generate a sample HTML page that then loads the JavaScript:
64+
65+
```bash
66+
$ emcc hello.c -o hello.html
67+
```
68+
69+
You can then serve the generated `hello.html` using the `emrun` tool, or a
70+
web server of your choosing.
71+
72+
73+
# Contributing
74+
75+
For information on how to contribute to the project, see
76+
[CONTRIBUTING.md](CONTRIBUTING.md) and the [Contributing section on the
77+
website](https://emscripten.org/docs/contributing/contributing.html).
78+
79+
80+
# License
3181

3282
Emscripten is available under 2 licenses, the MIT license and the
3383
University of Illinois/NCSA Open Source License.

0 commit comments

Comments
 (0)