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
On Windows 11 ARM64 (e.g. Snapdragon X Elite devices), hunk crashes immediately on every invocation that reaches the render path (hunk diff, hunk show, etc.). No hunkdiff-windows-arm64 prebuilt package exists in optionalDependencies (only hunkdiff-windows-x64 is published), so bin/hunk.cjs's findInstalledBinary() never finds a native hunk.exe and falls through to the bundled-Bun fallback (bunBinary → dist/npm/main.js). That fallback then fails during OpenTUI init:
hunk: Failed to initialize OpenTUI render library: bun:ffi dlopen() is not available in this build (TinyCC is disabled)
The process exits with status 1 within ~100-200ms. When hunk is launched from an embedding tool that opens it in its own pane/terminal (e.g. the herdr-hunk-diff plugin), this is especially confusing: the pane opens and closes again immediately, with no time to read the stderr line before the host closes it.
Verified with both hunkdiff@0.20.1 (bundled by the herdr plugin) and hunkdiff@0.22.0 (npm i -g hunkdiff) — both affected identically.
Root cause
This isn't a hunk-specific bug so much as a Bun/TinyCC platform gap: Bun explicitly disables bun:ffi on WIN32 && aarch64 (DEFAULT_ENABLE_TINYCC OFF), tracked upstream at oven-sh/bun#28055. There's in-progress work to add TinyCC ARM64 support (oven-sh/tinycc#2), but it isn't in a released Bun yet.
Other tools built on the same OpenTUI+Bun stack hit the exact same error message and have open issues tracking it:
None of those are hunk-specific fixes, but they confirm this is a shared, currently-unresolved platform limitation rather than something local to one install.
Steps to reproduce
On a Windows 11 ARM64 machine, npm i -g hunkdiff (or install via the herdr-hunk-diff plugin, which bundles it locally).
In any git repo with a working-tree diff, run hunk diff.
Process exits immediately with the OpenTUI/bun:ffi error above (exit code 1).
Expected behavior
Either:
A native hunkdiff-windows-arm64 prebuilt (once upstream Bun/TinyCC support lands), or
At minimum, a clearer failure than a near-instant silent crash — e.g. detect win32/arm64 up front and print an actionable "not supported yet on Windows ARM64, tracking: Support bun:ffi on Windows ARM64 oven-sh/bun#28055" message before attempting the Bun fallback, so tools that embed hunk in a pane/terminal (which close on non-zero exit) don't just flash and vanish.
What happened?
On Windows 11 ARM64 (e.g. Snapdragon X Elite devices),
hunkcrashes immediately on every invocation that reaches the render path (hunk diff,hunk show, etc.). Nohunkdiff-windows-arm64prebuilt package exists inoptionalDependencies(onlyhunkdiff-windows-x64is published), sobin/hunk.cjs'sfindInstalledBinary()never finds a nativehunk.exeand falls through to the bundled-Bun fallback (bunBinary→dist/npm/main.js). That fallback then fails during OpenTUI init:The process exits with status 1 within ~100-200ms. When
hunkis launched from an embedding tool that opens it in its own pane/terminal (e.g. the herdr-hunk-diff plugin), this is especially confusing: the pane opens and closes again immediately, with no time to read the stderr line before the host closes it.Verified with both
hunkdiff@0.20.1(bundled by the herdr plugin) andhunkdiff@0.22.0(npm i -g hunkdiff) — both affected identically.Root cause
This isn't a hunk-specific bug so much as a Bun/TinyCC platform gap: Bun explicitly disables
bun:ffionWIN32 && aarch64(DEFAULT_ENABLE_TINYCC OFF), tracked upstream at oven-sh/bun#28055. There's in-progress work to add TinyCC ARM64 support (oven-sh/tinycc#2), but it isn't in a released Bun yet.Other tools built on the same OpenTUI+Bun stack hit the exact same error message and have open issues tracking it:
None of those are hunk-specific fixes, but they confirm this is a shared, currently-unresolved platform limitation rather than something local to one install.
Steps to reproduce
npm i -g hunkdiff(or install via the herdr-hunk-diff plugin, which bundles it locally).hunk diff.Expected behavior
Either:
hunkdiff-windows-arm64prebuilt (once upstream Bun/TinyCC support lands), orwin32/arm64up front and print an actionable "not supported yet on Windows ARM64, tracking: Support bun:ffi on Windows ARM64 oven-sh/bun#28055" message before attempting the Bun fallback, so tools that embed hunk in a pane/terminal (which close on non-zero exit) don't just flash and vanish.Version
hunkdiff0.20.1 and 0.22.0 (both affected)