You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tier 0 of Bun-app support (driver: opencode, the Bun-platform TUI target). Exhaustive first-party usage across opencode's product packages (opencode/core/tui/ui/server/client/sdk/plugin/protocol/schema/llm/codemode/session-ui, src, non-test):
API
sites
notes
Bun.stringWidth(str)
25 (opencode 20, tui 5)
terminal cell width; east-asian-width + ANSI handling. Perry-native impl is also reusable for pi-tui (pi/kimi both bundle get-east-asian-width)
Bun.stdin.text()
2 (cli/cmd/tui.ts:60, cli/cmd/run.ts:416)
read-all of piped stdin
Bun.file(path)
2 (tui)
lazy file handle; only .text()/.arrayBuffer()/.exists()-class usage
Bun.write(dest, data)
2 (tui)
file/stdout write
Bun.hash(str)
1 (core/src/skill/discovery.ts:113)
cache-dir key via .toString(16); algorithm is wyhash — matching the algo keeps cache dirs compatible with bun-run installs, any stable hash is otherwise fine
import { pathToFileURL, fileURLToPath } from "bun"
3 (tui, opencode)
identical semantics to node:url — module-level alias
import type { SystemError } from "bun"
1
type-only, erased at build
Also worth registering while in here: Bun.Glob (used in opencode build scripts, common in the ecosystem) — optional.
Notable absences in opencode's product code (verified): no Bun.serve (HTTP is effect HttpRouter.serve over @effect/platform-node → node:http), no Bun.spawn (cross-spawn/child_process), no Bun.env, no $ shell at runtime, no Workers in the TUI path. The bun:sqlite / bun:ffi / pty surfaces are tracked separately — this issue is only the cheap global shim pack.
Acceptance: a compiled app using the table above resolves every call with node-identical observable behavior; bun-suite gains coverage for each shim.
Activity
bun-compat: Bun globals shim pack (Bun.stringWidth, Bun.file/write, B…
bun:ffi stage 1: address CodeRabbit review (PerryTS#6580)
runtime: C-ABI FFI stage 1 — dlopen, typed calls, ptr/CString on pinn…