Skip to content

v0.6.0

Choose a tag to compare

@sursaone sursaone released this 30 Oct 06:44

⚠️ 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 upgrade

The 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 cwd go 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 throws bun:ffi cannot convert argument to 'ptr' on Bun 1.4 (#52)

Internal

  • @types/bun 1.4.4, @types/node 26.6.6, TypeScript 7.0.2, bun.lock v2, and updated Rust crates (portable-pty stays 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 check type check