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
fix Windows ARM64 TUI startup when bun:ffi is unavailable #20767
@bold84 Thank you for looking into this. When do you think it will be merged? Or is there a tiny drop-in or a way to build from source people can use as a workaround in the meantime?
This also affects MiMo Code (XiaomiMiMo/MiMo-Code) which is a fork of OpenCode.
On Windows ARM64, mimo serve works but mimo attach (TUI) fails with the same
bun:ffi error. MiMo Code v0.1.4, Windows 11 ARM64, Snapdragon 8cx Gen 3.
I confirmed that OpenCode's TUI can run natively on Windows 11 ARM64 when OpenCode is compiled with a Bun build that includes Windows ARM64 bun:ffi/TinyCC support.
Bun added this support in oven-sh/bun#33696. OpenCode currently pins Bun 1.3.14, which predates that change. This does not mean every version newer than 1.3.14 will work automatically; the OpenCode build must use a Bun version that contains that merged change.
The TUI completed bootstrap and remained running during a bounded startup check
Logs showed the Windows watcher and location services starting
No TinyCC is disabled, bun:ffi dlopen() is not available, or OpenTUI initialization errors were present
This is still an experimental validation, not proof that the complete OpenCode test suite passes. The build skips dependency scripts and the embedded Web UI because tree-sitter-powershell attempted a local node-gyp build on the test machine, which lacked a Windows SDK. Full CI, native dependency, Web UI, plugin, and longer interactive-session testing are still needed.
Run the complete OpenCode test/build matrix on Windows ARM64.
Publish a newly verified official ARM64 artifact only after those tests pass.
Bun 1.4.0-canary.1 proves the original TinyCC/FFI blocker is resolved, but readiness of the official OpenCode ARM64 release still depends on that integration and test coverage.
Bun 1.4.2 adds bun:ffi/TinyCC support for Windows ARM64, which the TUI needs. OpenCode has been built with Bun 1.4.2 since #47446, so the TUI starts natively on Windows ARM64 without a workaround. The same problem is tracked in #19130.
Closing as completed. If the TUI still doesn't start on Windows ARM64 with the latest release, please open a new issue with your version and the error.
Activity
github-actions commentedon Apr 2, 2026
This issue might be a duplicate of existing issues. Please check:
bun:ffi dlopen() is not available in this build), and the same symptom of TUI failing to start.Please review that issue and add any new findings there if the underlying cause or context differs.
bold84 commentedon Apr 7, 2026
I added Windows ARM64 to TinyCC and created a PR:
oven-sh/tinycc#2
This is the bun issue...
oven-sh/bun#28055
Once TinyCC PR is merged, bun:ffi should be available on Windows ARM64.
johnW-ret commentedon Apr 15, 2026
@bold84 Thank you for looking into this. When do you think it will be merged? Or is there a tiny drop-in or a way to build from source people can use as a workaround in the meantime?
bold84 commentedon Apr 15, 2026
I don't know when or if the maintainer will merge it
Carson-yy commentedon Apr 24, 2026
I've encountered the same problem. When will it be fixed? Or is there any way to use it? Can a lower version work?
Hona commentedon Apr 24, 2026
No - bun doesnt work correctly on arm64.
we will be on node soon which will fix this
Billzhong2022 commentedon Apr 28, 2026
I've reproduced same issue. When will you fix it? Please help share ETA to us. Thanks!
jcompagner commentedon May 17, 2026
the original TinyCC already seems to have at least some support for this right? looking at this: TinyCC/tinycc@30afb50
ziyuei commentedon Jul 7, 2026
This also affects MiMo Code (XiaomiMiMo/MiMo-Code) which is a fork of OpenCode.
On Windows ARM64,
mimo serveworks butmimo attach(TUI) fails with the samebun:ffi error. MiMo Code v0.1.4, Windows 11 ARM64, Snapdragon 8cx Gen 3.
RGutierrezWind commentedon Aug 1, 2026
I confirmed that OpenCode's TUI can run natively on Windows 11 ARM64 when OpenCode is compiled with a Bun build that includes Windows ARM64
bun:ffi/TinyCC support.Bun added this support in oven-sh/bun#33696. OpenCode currently pins Bun 1.3.14, which predates that change. This does not mean every version newer than 1.3.14 will work automatically; the OpenCode build must use a Bun version that contains that merged change.
Tested environment:
1.4.0-canary.1+df49a6e1c19231fce4b70aa5f7894a0a0eb20ff29bd417db51.18.101. Download Bun Canary without replacing stable Bun
2. Verify FFI before building OpenCode
3. Clone and build OpenCode
The executable is produced at:
Validation performed
opencode.exe --versionreturned1.18.10TinyCC is disabled,bun:ffi dlopen() is not available, or OpenTUI initialization errors were presentThis is still an experimental validation, not proof that the complete OpenCode test suite passes. The build skips dependency scripts and the embedded Web UI because
tree-sitter-powershellattempted a localnode-gypbuild on the test machine, which lacked a Windows SDK. Full CI, native dependency, Web UI, plugin, and longer interactive-session testing are still needed.The durable path appears to be:
Bun
1.4.0-canary.1proves the original TinyCC/FFI blocker is resolved, but readiness of the official OpenCode ARM64 release still depends on that integration and test coverage.neriousy commentedon Oct 1, 2026
Bun 1.4.2 adds
bun:ffi/TinyCC support for Windows ARM64, which the TUI needs. OpenCode has been built with Bun 1.4.2 since #47446, so the TUI starts natively on Windows ARM64 without a workaround. The same problem is tracked in #19130.Closing as completed. If the TUI still doesn't start on Windows ARM64 with the latest release, please open a new issue with your version and the error.