Skip to content
Closed
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
a7fef27
Remove libuv on Windows and drive the event loop from an I/O completi…
dylan-conway Sep 15, 2026
9ba8068
spawn: search UTF-16 environment blocks with strings::index_of_any16
dylan-conway Sep 15, 2026
3604bdd
[autofix.ci] apply automated fixes
autofix-ci[bot] Sep 15, 2026
e72a2b8
Fix regressions found by CI and review of the Windows event loop change
dylan-conway Sep 15, 2026
f9022c5
sys: fold make_crt_owned into its one caller; drop two unused public …
dylan-conway Sep 15, 2026
44b550b
Fix what the review of the fixes, the wider test sweep and the bot re…
dylan-conway Sep 16, 2026
e850cfd
usockets(windows): a listener whose fallback poll could not be re-sub…
dylan-conway Sep 16, 2026
7443c2f
socket fault injection: the socket and poll_slow rules can be armed o…
dylan-conway Sep 16, 2026
f3b476b
Windows loop: one batch per tick, a ready list for known outcomes, ac…
dylan-conway Sep 16, 2026
fe2de9c
[autofix.ci] apply automated fixes
autofix-ci[bot] Sep 16, 2026
08e886e
paths: try_to_kernel32_path is Windows-only
dylan-conway Sep 16, 2026
5ef21ab
paths: try_to_w_path is Windows-only
dylan-conway Sep 16, 2026
17941f5
shell: a subprocess's forwarded output takes no completion after the …
dylan-conway Sep 16, 2026
101db1b
shell: take the captured writer's address before borrowing its IOWriter
dylan-conway Sep 16, 2026
3334575
Simplification pass; pipe pairs are not inheritable; Bun.file delete,…
dylan-conway Sep 16, 2026
a4d4794
source lints: node_fs.rs has one dead_code escape fewer
dylan-conway Sep 16, 2026
68a0150
Merge main
dylan-conway Sep 16, 2026
40fd096
Win32 declarations have one home; Bun.file truncate and read name fil…
dylan-conway Sep 16, 2026
1b377bf
Merge commit '68a01501a74' into claude/remove-libuv-windows-2d63e8
dylan-conway Sep 16, 2026
36ee530
test: the sliced copy in the Win32 name-rules test limits the destina…
dylan-conway Sep 16, 2026
7f60aa2
windows_sys: link attributes in the form the source lint requires
dylan-conway Sep 16, 2026
d682ea2
test: say which terminal was not collected and what write() did to it
dylan-conway Sep 16, 2026
ca5edb2
test: when a terminal is not collected, print what retains it
dylan-conway Sep 16, 2026
d15f307
Merge main
dylan-conway Sep 17, 2026
29ac145
Merge main
dylan-conway Sep 17, 2026
ba7c5ee
Merge main
dylan-conway Sep 17, 2026
99df246
iocp: look at the completion port only before a tick's first callback
dylan-conway Sep 17, 2026
d33ba63
iocp: accept with AcceptEx only, and deliver a refused poll from the …
dylan-conway Sep 17, 2026
811c818
Windows: fixes from a review of pipes, spawn, fs, the console and the…
dylan-conway Sep 17, 2026
f1c7e81
[autofix.ci] apply automated fixes
autofix-ci[bot] Sep 17, 2026
2d1f130
fs.watch: let go of a deleted directory's handle; make six tests hold…
dylan-conway Sep 17, 2026
4b9db9d
fs.watch: a directory that was deleted and made again can be watched …
dylan-conway Sep 17, 2026
a9a8d97
fs.watch (Windows): reuse a registered watcher only for the directory…
dylan-conway Sep 18, 2026
21a1987
spawn: the waiter thread's SIGCHLD handler restarts the system call i…
dylan-conway Sep 18, 2026
7cd8654
Merge main
dylan-conway Sep 19, 2026
17d0017
Windows: freeing a loop collects every operation it counts, and never…
dylan-conway Sep 19, 2026
a611ece
Windows streaming writer: a lent payload takes its cursor with it
dylan-conway Sep 19, 2026
b10c6a5
run_command test: read a terminal's output at its end, not at the pro…
dylan-conway Sep 19, 2026
9f8f45f
Windows console: drop the CONIN$ fallback for the line-read wake key
dylan-conway Sep 19, 2026
e26545a
Windows console: wake a line read through CONIN$ when stdin refuses t…
dylan-conway Sep 19, 2026
e376285
Windows spawn: Bun.file(path) given as a child's stdio is opened by W…
dylan-conway Sep 19, 2026
4c2fc47
Windows shell: close a redirect's disk file on the work pool
dylan-conway Sep 19, 2026
659407e
Windows fs.watch: ask for a long name only when the name can be an 8.…
dylan-conway Sep 19, 2026
b4700b7
Merge remote-tracking branch 'origin/main' into claude/remove-libuv-w…
dylan-conway Sep 20, 2026
4e684b7
[autofix.ci] apply automated fixes
autofix-ci[bot] Sep 20, 2026
4648eee
Windows fs.watch: resolve a changed name's 8.3 aliases by handle, not…
dylan-conway Sep 20, 2026
64b5981
Merge remote-tracking branch 'origin/claude/remove-libuv-windows-2d63…
dylan-conway Sep 20, 2026
b71532e
Windows FileSink: flush() settles once the in-flight write is written
dylan-conway Sep 20, 2026
9b4f21e
Tests: a read that is pending after module evaluation keeps the proce…
dylan-conway Sep 20, 2026
0ddbcb9
Shell: close a redirect target before the command that wrote it settles
dylan-conway Sep 20, 2026
79a056b
Windows fs.watch: ask each directory handle about one name only
dylan-conway Sep 20, 2026
24c911a
Windows: Bun.write() writes short input on the calling thread, as on …
dylan-conway Sep 20, 2026
81301b8
net: end() on a Windows named pipe no longer closes it at once
dylan-conway Sep 20, 2026
41c1e6d
Merge branch 'main' into claude/remove-libuv-windows-2d63e8
dylan-conway Sep 21, 2026
c00057f
windows: fixes from a review of the branch against main
dylan-conway Sep 21, 2026
46f3ba6
Merge branch 'main' into claude/remove-libuv-windows-2d63e8
dylan-conway Sep 21, 2026
7dfcdfa
Merge branch 'main' into claude/remove-libuv-windows-2d63e8
dylan-conway Sep 24, 2026
5bab683
[autofix.ci] apply automated fixes
autofix-ci[bot] Sep 24, 2026
22ee2f2
Merge branch 'main' into claude/remove-libuv-windows-2d63e8
dylan-conway Sep 26, 2026
7f11a6c
Merge branch 'main' into claude/remove-libuv-windows-2d63e8
dylan-conway Sep 27, 2026
d734d52
Fix review findings: fd job ordering, waiting pool, path and spawn bu…
dylan-conway Sep 27, 2026
d11a247
Merge remote-tracking branch 'origin/main' into claude/remove-libuv-w…
dylan-conway Sep 27, 2026
3f08b0c
[autofix.ci] apply automated fixes
autofix-ci[bot] Sep 27, 2026
0250eac
Release the sink of a Worker that ends mid-write; fs.close() does not…
dylan-conway Sep 27, 2026
47670c0
Tests: the dev server harness knows an aborted client by its full exi…
dylan-conway Sep 27, 2026
0e5011a
Named pipe end(): a message-type pipe is closed when idle too, unless…
dylan-conway Sep 27, 2026
4e40307
FAT and exFAT deletes and renames; files that were read are closed wh…
dylan-conway Sep 27, 2026
822847b
fs: only jobs on regular files take a place in the descriptor's line
dylan-conway Sep 27, 2026
46c4f45
delete_by_handle: what is not deleted after all stays read-only; two …
dylan-conway Sep 27, 2026
2cf1008
Tests: the builtin cat's closed-file tests are for Windows
dylan-conway Sep 27, 2026
f99e64f
fs: a descriptor's kind is asked on the pool, and only when a close h…
dylan-conway Sep 27, 2026
21cf2bf
fs: nothing is held behind a close, and what comes while it waits fin…
dylan-conway Sep 27, 2026
e76bebe
Tests: the reads that block on a pipe do not depend on the machine's …
dylan-conway Sep 27, 2026
4a7a662
Remove native code that exists only for tests; test the same things t…
dylan-conway Sep 27, 2026
6adadf0
Merge branch 'main' into claude/remove-libuv-windows-2d63e8
dylan-conway Sep 29, 2026
5f4957e
Merge branch 'main' into claude/remove-libuv-windows-2d63e8
dylan-conway Sep 29, 2026
c775ccd
Merge branch 'main' into claude/remove-libuv-windows-2d63e8
dylan-conway Sep 30, 2026
4245318
Windows: wait for pipe data with a zero-byte read, order writes per d…
dylan-conway Sep 30, 2026
43c36c9
Merge remote-tracking branch 'origin/main' into claude/remove-libuv-w…
dylan-conway Sep 30, 2026
f41bb3a
Tell the job ahead of a write about it only once the write is set up
dylan-conway Sep 30, 2026
d96273e
process.exit() does not wait behind a pipe; 'close' does not wait for…
dylan-conway Sep 30, 2026
33141bd
[autofix.ci] apply automated fixes
autofix-ci[bot] Sep 30, 2026
f8afdd4
Tests: end at once when the run they wait on has ended, and narrow to…
dylan-conway Sep 30, 2026
5f9cf78
child_process tests: count 'close' after the turn a second one would …
dylan-conway Sep 30, 2026
464ae94
Tests: pin node's handling of signals Windows cannot send, and give t…
dylan-conway Sep 30, 2026
2647bd2
Ctrl+C shell pipeline tests: send it once cat is in its read, and exp…
dylan-conway Sep 30, 2026
d153ebd
Windows: remove dead code and one-valued parameters; setRawMode works…
dylan-conway Sep 30, 2026
d15f099
ReadableStream: remove SourceContext::NAME, which only the removed se…
dylan-conway Sep 30, 2026
a9786b2
Windows: win back what was slower than main, and lose nothing for a c…
dylan-conway Oct 1, 2026
30a642b
Shell test: close the pipe before the builtin writes to it
dylan-conway Oct 1, 2026
2578426
Remove what libuv left behind: its headers, typed stubs, name lists a…
dylan-conway Oct 1, 2026
3d1721a
uv-polyfills.h: declare uv_once, which the macOS clock calls before i…
dylan-conway Oct 1, 2026
0b04fca
Terminal test: Server 2019's ConPTY can print the first character of …
dylan-conway Oct 1, 2026
01d4605
Remove bookkeeping and dead code that libuv's removal left without a job
dylan-conway Oct 1, 2026
2924662
Shell on Windows: a redirect to a DOS device goes to the device howev…
dylan-conway Oct 1, 2026
da4a397
setRawMode on Windows: remember that a handle is a console's input fo…
dylan-conway Oct 1, 2026
3628328
uv_hrtime on Windows asks for the frequency each time; a unit test ex…
dylan-conway Oct 1, 2026
49f5581
Windows pipes: bytes leave a synchronous pipe only while the loop wai…
dylan-conway Oct 1, 2026
d8f80a2
Shell on Windows: a relative name is the file Win32 means by it; mv t…
dylan-conway Oct 1, 2026
4beaf2b
Remove a one-shot arm no Windows poll reaches, and what still spoke o…
dylan-conway Oct 1, 2026
855fb11
node:fs and Bun.file on Windows: name files as main does, and fix wha…
dylan-conway Oct 1, 2026
7c0839a
process.exit() on Windows: a second for a write to a pipe to start, a…
dylan-conway Oct 1, 2026
4eca1e8
Merge branch 'main' into claude/remove-libuv-windows-2d63e8
dylan-conway Oct 1, 2026
783350b
Windows: a read or write of a device runs on the threads for jobs tha…
dylan-conway Oct 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .claude/docs/landing-prs.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Companion to the "Landing PRs: What Bun Reviewers Catch" section in CLAUDE.md. T
## Cross-platform

- **Never assume OS/ABI facts are portable.** errno meanings differ (EPERM is a sharing violation on Windows), event flags differ, Windows env vars are case-insensitive, Windows has no POSIX signals, blocking syscalls retry on EINTR. FFI/ABI: explicit calling conventions on BOTH sides; fixed-width or C-ABI types, never bare int read from c_ulong (LLP64 garbage on Windows); extern declarations diff'd parameter-by-parameter against definitions — they compile cleanly per side and crash only on the platform you didn't build; complete Windows error-translation tables with fallbacks instead of force-unwraps.
- **Platform parity is part of every fix.** When you fix one platform backend (POSIX vs kqueue vs epoll vs libuv), audit every sibling backend for the same defect and apply symmetrically — or state why a backend is unaffected ("kqueue register path is unhandled. You only patched unregister."). A POSIX-only API addition ships its Windows equivalent in the same PR. Enabling a feature on a new platform means grepping every gate, dispatch chain, parallel platform script, test skip, and allowlist. Platform-specific CI failures in files you touched are real merge-blocking bugs, never flakes. Comment WHY on every new platform exclusion.
- **Platform parity is part of every fix.** When you fix one platform backend (POSIX vs kqueue vs epoll vs IOCP), audit every sibling backend for the same defect and apply symmetrically — or state why a backend is unaffected ("kqueue register path is unhandled. You only patched unregister."). A POSIX-only API addition ships its Windows equivalent in the same PR. Enabling a feature on a new platform means grepping every gate, dispatch chain, parallel platform script, test skip, and allowlist. Platform-specific CI failures in files you touched are real merge-blocking bugs, never flakes. Comment WHY on every new platform exclusion.
- **Write tests to pass on every CI platform** (Windows, macOS x64+arm64, Linux glibc and musl). Split on `/\r?\n/` (Windows CRLF); normalize separators in path assertions; never spawn shell builtins (echo, sleep are not programs on Windows — use bunExe() -e); no hardcoded /tmp or /bin; incidental servers bind 127.0.0.1, never ::1 (CI Linux may lack IPv6 — IPv6-specific tests gate on the harness IPv6 helper); exit codes not signal names for "did not crash" (Windows has no signals); when probing a limit, exceed the LARGEST platform limit to trip the guard and stay under the SMALLEST when constructing inputs (macOS PATH_MAX is 1024). Before skipping a platform, verify it genuinely lacks the capability (Windows supports AF_UNIX). Skip narrowly via test.skipIf with a reason; never fix one platform by loosening assertions for all.
- **Decide explicitly: filesystem path or URL-like identifier.** Module specifiers, cache keys, sourcemap paths use forward slashes everywhere (posix path helpers). Filesystem paths use platform path APIs, never literal '/' concatenation. Windows: accept BOTH separators; drive-relative (C:foo) and UNC forms exist; PATH splits on ';'. On POSIX, backslash is a legal filename character. Splitting a posix-normalized string with the platform separator silently no-ops on Windows — feed the other separator style through every new API in tests.
- **Beyond `rust:check-all` (required by CLAUDE.md) for platform-gated code:** verify link-time symbol resolution (a POSIX extern must still resolve on Windows even if runtime-gated); audit enum switches duplicated across platform arms; distrust lint sweeps — a cast redundant on your host may be load-bearing on another target. Trick: flip the platform condition locally to force the other branch through the type-checker.
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/rust-system-calls/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn write_file(path: &[u8], data: &[u8]) -> Result<(), bun_sys::Error> {
| Aspect | bun_sys | std::fs / libc |
| ----------- | ---------------------------------- | ---------------------- |
| Return Type | `Maybe<T>` with rich `Error` | `io::Error` (lossy) |
| Windows | Full support with libuv fallback | Incomplete/POSIX-ish |
| Windows | Full support (native Win32/NT) | Incomplete/POSIX-ish |
| Error Info | errno, syscall tag, path, fd | errno only |
| EINTR | Automatic retry | Manual handling |
| Paths | `&[u8]` (WTF-8 safe) | `&Path` (UTF-8 lossy) |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Four independent jobs over the Rust workspace. They share `.github/actions/rust-

- `clippy` lints the default targets only (lib and bin): test code was never held to the clippy lint set. Its second step, `cargo check --workspace --all-targets`, type-checks `#[cfg(test)]` code, `tests/` and `benches/` so they keep compiling. Nothing else builds them except the crates `rust:miri` runs.
- `clippy`, `miri` and `lolhtml` pin `RUSTUP_TOOLCHAIN` at the workflow level (kept in sync with `channel` in `rust-toolchain.toml`) so rustup does not install that file's cross-target list; the action installs the toolchain with `--profile minimal` plus the components the job names (`clippy`, `miri rust-src`, none).
- `miri` also runs the `windows` modules of `bun_io` and `bun_spawn_sys` with `--target x86_64-pc-windows-msvc`. Miri interprets any target on any host and builds that target's std from `rust-src`, so this needs neither a Windows runner nor `rustup target add`. It is the only job that builds those `#[cfg(windows)]` tests: `cargo check --all-targets` above checks the host target only.
- `lolhtml` exists because the vendored lol-html is a fork (oven-sh/lol-html, `bun` branch) whose own test suite is the only thing guarding the fork's invariants. It used to trigger only on `scripts/build/deps/lolhtml.ts`; it now shares the workflow's wider path filter.
- `mordant` runs the [mordant](https://github.com/scarletindustries/mordant) lint pack as an advisory (`continue-on-error`) job. Mordant ships its own runner, the way clippy does. `cargo mordant` is `cargo check` with `mordant-driver` (rustc with the lints linked in) as `RUSTC_WORKSPACE_WRAPPER`, and it builds into `target/mordant/check`. The shared action installs mordant's nightly (`MORDANT_TOOLCHAIN`) with `rustc-dev` and `llvm-tools-preview`, and every cargo call in the job names it (`cargo +"$MORDANT_TOOLCHAIN" …`): `cargo install --locked --git … --rev "$MORDANT_REV"` builds the two binaries with it, and `scripts/rust-mordant.ts` runs `cargo mordant` under it. It is not spelled `RUSTUP_TOOLCHAIN` because `test/internal/source-lints/ci-image-pins.test.ts` holds every `RUSTUP_TOOLCHAIN: nightly-…` in a workflow to the channel in `rust-toolchain.toml`, and this one moves with mordant instead. One cache covers them: `~/.cargo/bin/{cargo-mordant,mordant-driver}`, keyed on the nightly and the rev. The job restores it with `actions/cache/restore` and saves it with `actions/cache/save` right after the build, because the post step of `actions/cache` does not run in a job that failed, and a pull request with a finding over the baseline would then build mordant again on every push. Because that nightly is older than ours, the script passes `-A unknown_lints` through `MORDANT_RUSTFLAGS`. It is skipped on `merge_group`.
- Mordant's nightly is the compiler that checks this workspace while the lints run, so it must still be able to compile it. When a `rust-toolchain.toml` bump brings in an API that nightly lacks, the job fails on every PR until mordant moves to a newer nightly and the pin here follows. #42851 was one: the job was off from then until mordant moved to 2026-09-01.
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ The Rust side is a Cargo workspace of ~200 crates rooted at `Cargo.toml`. The ke

#### Vendored Dependencies (`vendor/`)

Third-party native libraries are vendored locally and can be read from disk (not git submodules): boringssl (TLS/crypto), brotli, cares (async DNS), hdrhistogram, highway (SIMD), libarchive (tar/zip), libdeflate, libuv (Windows event loop), lolhtml (HTML rewriter), lshpack (HTTP/2 HPACK), lsqpack + lsquic (HTTP/3), mimalloc (allocator), nodejs (headers), picohttpparser, rust-argon2 (argon2 for `Bun.password`, Rust), tinycc (FFI JIT, fork: oven-sh/tinycc), WebKit (JavaScriptCore), zlib (zlib-ng), zstd. Build configuration for these is in `scripts/build/deps/*.ts`.
Third-party native libraries are vendored locally and can be read from disk (not git submodules): boringssl (TLS/crypto), brotli, cares (async DNS), hdrhistogram, highway (SIMD), libarchive (tar/zip), libdeflate, lolhtml (HTML rewriter), lshpack (HTTP/2 HPACK), lsqpack + lsquic (HTTP/3), mimalloc (allocator), nodejs (headers), picohttpparser, rust-argon2 (argon2 for `Bun.password`, Rust), tinycc (FFI JIT, fork: oven-sh/tinycc), WebKit (JavaScriptCore), zlib (zlib-ng), zstd. Build configuration for these is in `scripts/build/deps/*.ts`.

### JavaScript Class Implementation (C++)

Expand Down
26 changes: 6 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ members = [
"src/js_parser_jsc",
"src/js_printer",
"src/libdeflate_sys",
"src/libuv_sys",
"src/ast",
"src/ast_jsc",
"src/picohttp",
Expand Down Expand Up @@ -392,7 +391,6 @@ bun_js_parser = { path = "src/js_parser" }
bun_js_parser_jsc = { path = "src/js_parser_jsc" }
bun_js_printer = { path = "src/js_printer" }
bun_libdeflate_sys = { path = "src/libdeflate_sys" }
bun_libuv_sys = { path = "src/libuv_sys" }
bun_ast = { path = "src/ast" }
bun_ast_jsc = { path = "src/ast_jsc" }
bun_picohttp = { path = "src/picohttp" }
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Bun statically links these libraries:
| [`c-ares`](https://github.com/c-ares/c-ares) | MIT licensed |
| [`libicu`](https://github.com/unicode-org/icu) 78 | [license here](https://github.com/unicode-org/icu/blob/main/icu4c/LICENSE) |
| [`libbase64`](https://github.com/aklomp/base64/blob/master/LICENSE) | BSD 2-Clause |
| [`libuv`](https://github.com/libuv/libuv) (on Windows) | MIT |
| [`libuv`](https://github.com/libuv/libuv) (headers and ported functions) | MIT |
| [`libdeflate`](https://github.com/ebiggers/libdeflate) | MIT |
| [`libjpeg-turbo`](https://github.com/libjpeg-turbo/libjpeg-turbo) | [BSD 3-Clause / IJG / zlib](https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/LICENSE.md) |
| [`libspng`](https://github.com/randy408/libspng) | BSD 2-Clause |
Expand Down
2 changes: 1 addition & 1 deletion docs/project/license.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Bun statically links these libraries:
| [`c-ares`](https://github.com/c-ares/c-ares) | MIT licensed |
| [`libicu`](https://github.com/unicode-org/icu) 78 | [ICU license](https://github.com/unicode-org/icu/blob/main/icu4c/LICENSE) |
| [`libbase64`](https://github.com/aklomp/base64/blob/master/LICENSE) | BSD 2-Clause |
| [`libuv`](https://github.com/libuv/libuv) (on Windows) | MIT |
| [`libuv`](https://github.com/libuv/libuv) (headers and ported functions) | MIT |
| [`libdeflate`](https://github.com/ebiggers/libdeflate) | MIT |
| [`libjpeg-turbo`](https://github.com/libjpeg-turbo/libjpeg-turbo) | BSD 3-Clause / IJG / zlib |
| [`libspng`](https://github.com/randy408/libspng) | BSD 2-Clause (portions derived from libpng, PNG Reference Library License v2) |
Expand Down
2 changes: 1 addition & 1 deletion docs/runtime/child-process.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ When passing an existing `Terminal` object:
- **No echo without a child process on Windows.** On POSIX, the kernel line discipline echoes `write()` input back to the `data` callback even with no process attached. ConPTY has no line discipline; it buffers input for the next reader. If you need echo, spawn a process that echoes.
- **ConPTY re-encodes output.** ConPTY renders the child's output to a virtual screen and emits whatever VT sequences describe the result. The `data` callback therefore receives semantically equivalent, but not byte-identical, escape sequences. ConPTY preserves colors and text; it may reorder or coalesce cursor-positioning and reset sequences. ConPTY also emits a short VT init sequence (`\x1b[?9001h\x1b[?1004h…`) before any child output.
- **Input `\r` is not translated to `\n` on Windows.** POSIX `ICRNL` maps carriage return to newline on input; ConPTY passes `\r` through unchanged.
- **`process.on('SIGWINCH')` in the child does not fire under ConPTY** unless the child is reading stdin in raw mode. `process.stdout.columns`/`rows` do update after `resize()`. The missing signal is a libuv limitation that affects any libuv-based child (Node.js included).
- **`process.on('SIGWINCH')` in the child does not fire under ConPTY** unless the child is reading stdin in raw mode: ConPTY reports a resize only to the reader of its input. A Bun child in raw mode gets `SIGWINCH` at once, as does a Node.js child (or any other libuv-based child). `process.stdout.columns`/`rows` do update after `resize()`.
- On Windows before 11 24H2 (build 26100), `terminal.close()` may not terminate a still-running child promptly. The delay comes from [`ClosePseudoConsole`](https://learn.microsoft.com/en-us/windows/console/closepseudoconsole), which blocks on those versions until conhost has flushed its output through the pipe. Kill the attached process first if you need to tear down with a running child.
- **Mouse tracking does not work on Windows 10 or Windows Server 2019.** The inbox ConPTY in those versions (conhost build 17763 through 19045) predates [microsoft/terminal#4856](https://github.com/microsoft/terminal/pull/4856) and drops the mouse-tracking enable sequences (`\x1b[?1000h`, `\x1b[?1002h`, `\x1b[?1006h`) that the child writes. They never reach the `data` callback, so the outer terminal never reports mouse events and the child never sees them. Windows 11 and Server 2022 relay the sequences, but only after the child has enabled VT input mode (for example with `process.stdin.setRawMode(true)`) before it writes them.

Expand Down
6 changes: 0 additions & 6 deletions mordant-baseline.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@
"unused_pub:src/jsc/host_fn.rs" = 2
"unused_pub:src/jsc/lib.rs" = 1

[bun_libuv_sys]
"reimplemented_helper:src/libuv_sys/libuv.rs" = 1
"unused_pub:src/libuv_sys/lib.rs" = 2
"unused_pub:src/libuv_sys/libuv.rs" = 41
"unused_pub:src/libuv_sys/open_handles.rs" = 1

[bun_opaque]
"unused_pub:src/opaque/lib.rs" = 2

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"build:types": "bun scripts/build.ts --mode=codegen --target=generated-types",
"build:release:local": "bun scripts/build.ts --profile=release-local --build-dir=build/release-local",
"run:linux": "docker run --rm -v \"$PWD:/root/bun/\" -w /root/bun ghcr.io/oven-sh/bun-development-docker-image",
"uv-posix-stubs": "bun run src/jsc/bindings/libuv/generate_uv_posix_stubs.ts",
"uv-stubs": "bun run src/jsc/bindings/libuv/generate_uv_stubs.ts",
"orderfile": "bun scripts/orderfile/generate.ts",
"jsc:build": "bun scripts/build.ts --profile=release-local --build-dir=build/release-local --target=WebKit",
"jsc:build:debug": "bun scripts/build.ts --profile=debug-local --build-dir=build/debug-local --target=WebKit",
Expand Down
Loading