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
{{ message }}
Repository navigation
Windows ARM64 native builds fail: bun:ffi unavailable in stable Bun, bun-pty ships x64-only DLL #45875
Building and running opencode natively on Windows on ARM (arm64, e.g. Snapdragon X laptops) hits two runtime gaps. The build itself works with Bun 1.4.0 (packages/opencode/script/build.ts already lists a win32 arm64 target), but the TUI and #pty shell sessions break.
1. TUI renderer needs bun:ffi, which stable Bun disables on windows-aarch64
OpenTUI (@opentui/core) loads a native opentui.dll through bun:ffi. Stable Bun 1.3.x ships bun:ffi compiled out on windows-aarch64 (TinyCC has no ARM64 backend), so the TUI fails at startup with:
Failed to initialize OpenTUI render library: bun:ffi dlopen() is not available in this build (TinyCC is disabled)
Bun 1.4.0+ ships an engine-native FFI that works on Windows ARM64, so this is resolved by requiring Bun >= 1.4.0 there.
2. bun-pty ships only an x64 Windows DLL
bun-pty@0.4.8's Windows binary (rust_pty.dll) is x64-only and cannot be loaded by an arm64 process, breaking shell sessions via #pty. bun-pty is a Rust crate using the portable-pty backend and cross-compiles cleanly — it just needs a win32-arm64 build published (repo: github.com/sursaone/bun-pty).
Suggested fixes
Document and/or enforce Bun >= 1.4.0 for windows-arm64 (CI matrix + docs).
bun-pty: publish a windows-arm64 build, or have opencode vendor/swap the DLL for arm64 (the current local workaround does exactly this via a postinstall step).
Verified context
Native single-file build (opencode-windows-arm64) succeeds with Bun 1.4.0 (arm64) on Windows 11 ARM64.
Everything else in the toolchain (esbuild, tree-sitter, @opentui/core-win32-arm64, etc.) resolves for arm64 out of the box.
Happy to send the local patch (postinstall DLL swap + install script windows-arm64 combo) as a PR if useful.
Please check those threads to see if your issue is already being tracked or if there is useful context there. If your report covers something not addressed in those issues (particularly the bun-pty x64-only DLL for Windows ARM64), feel free to note that distinction.
Update: pre-existing PRs already cover both gaps — #44665 (install allowlist, by the issue author) and #44946 (Bun pin 1.4.0 + compatibility fixes, by the issue author). My PRs #45877/#45878 were closed as duplicates in favor of those. The remaining follow-up is the bun-pty x64-only Windows DLL (upstream: github.com/sursaone/bun-pty).
It adds a separately named Windows ARM64 DLL, native ARM64 build/publish jobs, static CRT linkage, runtime selection with the existing x64 fallback preserved, and a bun build --compile ARM64 smoke test. I validated the ARM64 artifact locally on Windows 11 ARM64 with Bun 1.4.0: 86 unit tests and 11 integration tests pass, and the compiled executable runs successfully outside the repository.
Once released, this should complement #44665 and #44946 on the OpenCode side.
Is anyone here aware of other blockers here for Arm64 support? Folks are trying this on the new Surface Laptop Ultra and other RTX Spark devices but are immediately blocked due to this problem. I just tried 1.18.35 and it fails on my Snapdragon devices as well.
Hi @Psychlist1972 , I checked the current release and the upstream fixes.
The bun-pty ARM64 work is published in 0.4.11. Its npm package includes the native rust_pty_arm64.dll, and the loader selects it on win32/arm64. OpenCode 1.18.35 and current dev still pin bun-pty 0.4.8.
The CLI release pipeline also still uses the global Bun 1.3.14 pin. The Windows-only 1.4.2 override does not apply to the CLI build, which runs on Ubuntu. Stable Bun has supported Windows ARM64 FFI since 1.4.0.
There is a new development for #44946: Bun 1.4.3 was released today and includes the fix for oven-sh/bun#42837, the compiled splitting regression reported with 1.4.1/1.4.2. It looks worth updating the proposed bump to 1.4.3 and validating the compiled artifact with bun-pty 0.4.11.
The shell installer also still excludes windows-arm64; #44665 was closed without merging.
Activity
github-actions commentedon Aug 28, 2026
This issue might be a duplicate of existing issues. Please check:
Please check those threads to see if your issue is already being tracked or if there is useful context there. If your report covers something not addressed in those issues (particularly the bun-pty x64-only DLL for Windows ARM64), feel free to note that distinction.
ataidecarlos commentedon Aug 28, 2026
Update: pre-existing PRs already cover both gaps — #44665 (install allowlist, by the issue author) and #44946 (Bun pin 1.4.0 + compatibility fixes, by the issue author). My PRs #45877/#45878 were closed as duplicates in favor of those. The remaining follow-up is the
bun-ptyx64-only Windows DLL (upstream: github.com/sursaone/bun-pty).dakehero commentedon Aug 31, 2026
The remaining native
bun-ptypiece is now proposed in sursaone/bun-pty#46.It adds a separately named Windows ARM64 DLL, native ARM64 build/publish jobs, static CRT linkage, runtime selection with the existing x64 fallback preserved, and a
bun build --compileARM64 smoke test. I validated the ARM64 artifact locally on Windows 11 ARM64 with Bun 1.4.0: 86 unit tests and 11 integration tests pass, and the compiled executable runs successfully outside the repository.Once released, this should complement #44665 and #44946 on the OpenCode side.
Psychlist1972 commentedon Oct 10, 2026
Hi All
Is anyone here aware of other blockers here for Arm64 support? Folks are trying this on the new Surface Laptop Ultra and other RTX Spark devices but are immediately blocked due to this problem. I just tried 1.18.35 and it fails on my Snapdragon devices as well.
Pete
Microsoft
dakehero commentedon Oct 10, 2026
Hi @Psychlist1972 , I checked the current release and the upstream fixes.
The bun-pty ARM64 work is published in 0.4.11. Its npm package includes the native rust_pty_arm64.dll, and the loader selects it on win32/arm64. OpenCode 1.18.35 and current dev still pin bun-pty 0.4.8.
The CLI release pipeline also still uses the global Bun 1.3.14 pin. The Windows-only 1.4.2 override does not apply to the CLI build, which runs on Ubuntu. Stable Bun has supported Windows ARM64 FFI since 1.4.0.
There is a new development for #44946: Bun 1.4.3 was released today and includes the fix for oven-sh/bun#42837, the compiled splitting regression reported with 1.4.1/1.4.2. It looks worth updating the proposed bump to 1.4.3 and validating the compiled artifact with bun-pty 0.4.11.
The shell installer also still excludes windows-arm64; #44665 was closed without merging.
dakehero commentedon Oct 10, 2026
I’ve updated OpenCode to use
bun-pty0.4.11, and it works fine locally on Windows ARM64 with Bun 1.4.3. @Psychlist1972Psychlist1972 commentedon Oct 12, 2026
Thank you!
Pete
Microsoft