Skip to content

Address pr comments#1

Merged
maceip merged 23 commits intomainfrom
address-pr-comments
Mar 5, 2026
Merged

Address pr comments#1
maceip merged 23 commits intomainfrom
address-pr-comments

Conversation

@maceip
Copy link
Copy Markdown
Owner

@maceip maceip commented Mar 5, 2026

No description provided.

juj and others added 23 commits February 26, 2026 22:02
…emscripten-core#26343)

When using the `--failing-and-slow-first` flag on the CI, treat failure
to parse the previous run log file as a non-fatal error, to help
forcibly terminated CI jobs recover.
When EMTEST_AUTOSKIP=1 and current Node.js version is less than 25, then
skip the Node.js 25 requiring tests automatically.
)

emscripten-core#26297 didn't make it into the 5.0.2 tag. This pull request moves the
ChangeLog entry to 5.0.3.
…mscripten-core#26345)

This removes the dependency that libc++abi has on the pthread API
functions, allowing
better support for Wasm Workers.

Replaces: emscripten-core#26283

Fixes: emscripten-core#26277
When building -sSINGLE_FILE builds with -sSINGLE_FILE_BINARY_ENCODE
enabled, the base64Decode function was being emitted, and Closure was
unable to DCE away the dependent base64ReverseLookup variable. So
optimize this away manually to save code size.

---------

Co-authored-by: juj <clb@h12dsi.clbri.com>
This file seems like it was previously referenced in the docs prior to
6dc95a7 but never actually built or used in any test.
Also, add more assertions about the return value.
)

Also, run it both with and without pthreeds, as it seems like it was
originally intended.
… NFC (emscripten-core#26359)

This works for over 100 reftests in test_browser.py
Support multi-threaded applications in memoryprofiler.

Fixes emscripten-core#18107.
…fault. NFC (emscripten-core#26363)

These are only ever used by EMSCRIPTEN_TRACING so we know exactly when
to include them.

I noticed this while reviewing emscripten-core#26175
…#26364)

This allows for the complete removal of `libmemoryprofiler.js` since the
memory profiler can now just use the same libtrace-based hooks for all
events.

I noticed this while reviewing emscripten-core#26175
These files should have been removed in emscripten-core#6827 (2018!)
…er (emscripten-core#26370)

From what I gather, this header was only ever supported in Firefox, and
now Firefox has removed it.

https://bugzilla.mozilla.org/show_bug.cgi?id=1598759
Replaces the WebSocket-to-POSIX-socket proxy with Chrome's Direct Sockets
API (TCPSocket, TCPServerSocket, UDPSocket) for real TCP/UDP networking
from WASM in Isolated Web Apps.

Socket fds are registered in Emscripten's FS using the SOCKFS pattern
(FS.createNode + FS.createStream with custom stream_ops), so write(fd)
and read(fd) work on socket file descriptors -- required by OpenSSL and
other libraries that use write()/read() instead of send()/recv().

New files:
  src/lib/libdirectsockets.js - all socket syscall implementations

Modified files:
  src/settings.js - adds DIRECT_SOCKETS flag
  src/modules.mjs - registers libdirectsockets.js when flag is enabled
  src/lib/libsyscall.js - guards default socket impls when active
  src/lib/libwasi.js - fd_close path for Direct Socket fds
  emscripten_syscall_stubs.c - comments out conflicting setsockopt stub

Usage: emcc -sDIRECT_SOCKETS -sJSPI -sPROXY_TO_PTHREAD -pthread app.c -o app.js

Tested with Tor (unmodified upstream C) compiled to WASM, bootstrapping
100% in ~15 seconds in a Chrome IWA, and a QUIC stack (ngtcp2 + wolfSSL +
nghttp3) achieving 90% of native throughput on UDP.
… errno propagation, state preservation, DNS fixes, revert stubs.c
simplify globalThis check per sbc100 suggestion
add sock opt constants to struct_info json and use cDefs instead of
hardcoded vals per sbc100 feedback
extract doh dns resolution out of this pr per sbc100 req to split
into sep pr - _emscripten_lookup_name now uses std dns only
add asyncify guard w error msg at top of file per sbc100
add direct sockets section to networking rst docs per sbc100
fix sockpair naming to use monotonic counter instead of
Object.keys().length which can produce dupes after close
getsockname getpeername errno propagation already correct
fionread udp datagram handling already addressed
stream_ops read write already handle udp dgram shape
connect failure already preserves bound state
_emscripten_lookup_name deps and ret type already fixed
dns address_map already stores string not array

https://claude.ai/code/session_013tMRcS8HLZpNDZ4vLoNp7C
@maceip maceip merged commit 112c574 into main Mar 5, 2026
@maceip maceip deleted the address-pr-comments branch March 5, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants