Skip to content

Baseline (non-AVX2) macOS x64 — bun + opencode v1.18.1

Choose a tag to compare

@tobocop2 tobocop2 released this 15 Jul 03:59

Baseline (non-AVX2) macOS x64 builds for pre-Haswell Intel Macs, where the official -baseline packages are byte-identical to the AVX2 builds and crash with SIGILL.

Most people want opencode-darwin-x64-baseline.

chmod +x opencode-darwin-x64-baseline
./opencode-darwin-x64-baseline --version

Why this exists

The shipped opencode-darwin-x64-baseline is the same file as opencode-darwin-x64 (both AVX2), because bun's darwin packages are identical, because oven-sh/WebKit never builds a baseline macOS WebKit (bun-webkit-macos-amd64-baseline.tar.gz → HTTP 404). See opencode#29039, opencode#24876.

Does it work?

binary AVX2 (ymm)
shipped opencode-darwin-x64-baseline 248,019
this build 14,407
@oven/bun-linux-x64-baseline (verified on real pre-AVX2 hardware) 12,328

A baseline isn't "zero AVX2" — the residual is behind CPUID runtime dispatch. This matches the linux baseline profile, which I verified on a real Sandy Bridge CPU (no AVX2): it runs opencode run "say hi" to completion, while the AVX2 build crashes (~21s, ~3.9 GB, segfault).

Caveat: I could not test these macOS binaries on a real pre-AVX2 Mac — nobody rents one. If you try it, please report back.

Provenance

  • bun: built from main @ 1e35118008 — reports as 1.4.0-dev, not an official 1.3.14 baseline
  • opencode: v1.18.1 compiled against that bun
  • WebKit: 4895f45dfbd0d1226c4d41799887bc0ecb9f341b, built with -march=nehalem
bede5eb3c917fa353d6b067fd7055d42774db7a7d5a09c21fa6cdd05e3d8efee  bun-darwin-x64-baseline
7daf210676d2efa9627619ab1823b141c861aa362f8a828db836472d9790e61f  opencode-darwin-x64-baseline

Build steps: see the README. Unofficial; not affiliated with oven-sh or anomalyco.