Symptoms
packages/desktop/scripts/predev.ts (invoked by Tauri''s beforeDevCommand and beforeBuildCommand) downloads the Bun baseline runtime (opencode-windows-x64-baseline.exe etc., ~190 MB) from GitHub releases on first build. In China and some restricted networks, GitHub release downloads are slow or fail entirely (TLS reset, partial download, etc.). Build halts with no useful fallback path.
Why baseline matters
The baseline build targets older CPUs without AVX2. For local dev where the developer''s machine almost certainly has AVX2 (any 2013+ Intel / 2017+ AMD), the regular Bun runtime that''s already installed is sufficient.
Proposal
In predev.ts:
- Detect the locally installed
bun in PATH and check if it can produce a single-file binary at the desired target.
- If yes, run
bun build --single against packages/opencode to emit a sidecar binary using the local runtime. This avoids the baseline download entirely on dev machines.
- Only fall back to the GitHub download when local bun is missing or the target architecture genuinely needs baseline (e.g. CI building release artifacts for distribution).
This is what we did in our fork''s build-deskfox.ps1 (downstream of predev.ts), and it works reliably on Windows behind restricted networks — the local bun is already installed via packageManager: bun@1.3.13, so bun build --single just works.
Workaround for affected users today
Set HTTP_PROXY / HTTPS_PROXY to a working proxy before bun dev. Or manually drop a baseline binary at the expected sidecar path.
Happy to draft a PR if upstream agrees this is the right direction.
Symptoms
packages/desktop/scripts/predev.ts(invoked by Tauri''sbeforeDevCommandandbeforeBuildCommand) downloads the Bun baseline runtime (opencode-windows-x64-baseline.exeetc., ~190 MB) from GitHub releases on first build. In China and some restricted networks, GitHub release downloads are slow or fail entirely (TLS reset, partial download, etc.). Build halts with no useful fallback path.Why baseline matters
The baseline build targets older CPUs without AVX2. For local dev where the developer''s machine almost certainly has AVX2 (any 2013+ Intel / 2017+ AMD), the regular Bun runtime that''s already installed is sufficient.
Proposal
In
predev.ts:bunin PATH and check if it can produce a single-file binary at the desired target.bun build --singleagainstpackages/opencodeto emit a sidecar binary using the local runtime. This avoids the baseline download entirely on dev machines.This is what we did in our fork''s
build-deskfox.ps1(downstream ofpredev.ts), and it works reliably on Windows behind restricted networks — the localbunis already installed viapackageManager: bun@1.3.13, sobun build --singlejust works.Workaround for affected users today
Set HTTP_PROXY / HTTPS_PROXY to a working proxy before
bun dev. Or manually drop a baseline binary at the expected sidecar path.Happy to draft a PR if upstream agrees this is the right direction.