Repository navigation
v0.6.0
⚠️ Breaking: Bun 1.4.0 or newer is required
bun-pty now uses the engine-native bun:ffi that arrived in Bun 1.4. On an older Bun, importing still works, and spawn() throws bun-pty needs Bun 1.4.0 or newer, but this is Bun 1.3.x. Run \bun upgrade`.`
bun upgradeThe JavaScript API is unchanged. If you build your own native library and point BUN_PTY_LIB at it, rebuild it from this version: the length argument of bun_pty_read and bun_pty_write is now usize.
Changed
- Bun 1.4's faster FFI (#52)
- Bun reports FFI calls up to 3x faster in 1.4, and hot call sites are JIT-compiled to direct C calls
- Reads and writes pass the buffer and its byte length as one view (
"buffer"+"buffer_length"), so the two cannot disagree - The command line and
cwdgo to the native library as plain strings - Library load failures now include the operating system's
dlerror()message
- README: a section on choosing between bun-pty and Bun's built-in
Bun.Terminal
Fixed
write("")no longer throwsbun:ffi cannot convert argument to 'ptr'on Bun 1.4 (#52)
Internal
@types/bun1.4.4,@types/node26.6.6, TypeScript 7.0.2,bun.lockv2, and updated Rust crates (portable-ptystays at 0.8.1 because of wezterm/wezterm#6783)- GitHub Actions on their current major versions, no persisted checkout credentials in the publish workflow, CI on Alpine 3.24 and on Bun 1.4.0, and a
bun checktype check