summaryrefslogtreecommitdiffstats
path: root/Python/emscripten_syscalls.c
Commit message (Collapse)AuthorAgeFilesLines
* gh-124621: Emscripten: Fix __syscall_ioctl patch (GH-136993)Hood Chatham2025-07-221-2/+6
| | | | | If there is an error, we have to return `-errno` not positive errno. Included in backport of GH-136931: #136988
* gh-124621: Emscripten: Support pyrepl in browser (GH-136931)Hood Chatham2025-07-221-9/+107
| | | | | | | | | | | | | | | | Basic support for pyrepl in Emscripten. Limitations: * requires JSPI * no signal handling implemented As followup work, it would be nice to implement a webworker variant for when JSPI is not available and proper signal handling. Because it requires JSPI, it doesn't work in Safari. Firefox requires setting an experimental flag. All the Chromiums have full support since May. Until we make it work without JSPI, let's keep the original web_example around. Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Éric <merwok@netwok.org>
* gh-136251: Improvements to WASM demo REPL (GH-136252)adam j hartz2025-07-211-1/+1
| | | Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
* gh-124621: Emscripten: Fix regression in use-after-close error handling ↵Hood Chatham2025-07-191-1/+8
| | | | (#136837)
* gh-124621: Emscripten: Add support for async input devices (GH-136822)Hood Chatham2025-07-191-0/+175
| | | | | | | | | | | | | | | | | | This is useful for implementing proper `input()`. It requires the JavaScript engine to support the wasm JSPI spec which is now stage 4. It is supported on Chrome since version 137 and on Firefox and node behind a flag. We override the `__wasi_fd_read()` syscall with our own variant that checks for a readAsync operation. If it has it, we use our own async variant of `fd_read()`, otherwise we use the original `fd_read()`. We also add a variant of `FS.createDevice()` called `FS.createAsyncInputDevice()`. Finally, if JSPI is available, we wrap the `main()` symbol with `WebAssembly.promising()` so that we can stack switch from `fd_read()`. If JSPI is not available, attempting to read from an AsyncInputDevice will raise an `OSError`.
* gh-127146: Emscripten: Make os.umask() actually work (#136706)Hood Chatham2025-07-161-1/+21
| | | | Provide a stub implementation of umask that is enough to get some tests passing. More work is needed upstream in Emscripten to make all umask tests to pass.
* gh-127146: Report uid in Emscripten + node as native uid (#136509)Hood Chatham2025-07-161-0/+19
Corrects the handling of getuid on emscripten, which was consistently reporting as 0.