bun15 branch vs official Zig 0.15.2 — change analysis
bun15 tracks Bun's downstream fork (oven-sh/zig, the upgrade-0.15.2 line), pinned at commit c6df1f40 ("Merge oven-sh/zig#21 — llvm: improve IR attributes and cast flags for better optimization").
It descends cleanly from tag 0.15.2 with 35 commits on top (3 merged PRs: oven-sh/zig#16, oven-sh/zig#17, oven-sh/zig#21), touching ~60 files (+1,641 / −812). The reported compiler version is still 0.15.2 — this is a Bun-tuned 0.15.2, not an upgrade to a newer Zig.
1. LLVM codegen improvements (the headline — oven-sh/zig#21)
2. Target & linker additions
- New
aarch64-windows-gnu build target.
- MachO: match
arm64e TBD targets when linking arm64 (src/link/MachO.zig, src/link/MachO/Dylib.zig).
- f16 ABI fix on Darwin (CBE +
compiler_rt); gate strlen extern off the C backend.
3. Language / tooling tweaks Bun relies on
4. Downstream std patches ("our patches")
Broad edits to lib/std/posix.zig (548 lines churned), fs/Dir.zig, mem.zig, mem/Allocator.zig (+15), os/windows.zig, os/linux.zig, Io/Writer.zig (+43), crypto (argon2, bcrypt), and Build/Module.zig + Build/Step/Compile.zig (a no_link_obj path).
5. Build system / CI / caching
- Replaces upstream
ci.yaml with .github/workflows/bun_build.yaml — Bun's matrix (macos / linux-musl / windows-gnu × {safe, debug}) built via zig-bootstrap, ReleaseSafe vs ReleaseFast variants, releases named by branch (so stable and -fast are distinguishable).
- LLVM build caching (cache keys, include
out/host), several "fix build crash" commits, "skip lf flush when no link is set", CMakeLists.txt, build.zig, and a heavily trimmed README.md.
Net assessment
A Bun-tuned 0.15.2 focused on better LLVM optimization/LTO, extra macOS/Windows target support, compiler introspection / zig fmt conveniences, and a custom multi-target build/CI pipeline — layered on the unchanged 0.15.2 base.
Branch pushed to cataggar/zig as bun15. Comparison base: tag 0.15.2 (e4cbd752c8). Generated from git log/diff 0.15.2..bun15.
bun15branch vs official Zig 0.15.2 — change analysisbun15tracks Bun's downstream fork (oven-sh/zig, theupgrade-0.15.2line), pinned at commitc6df1f40("Merge oven-sh/zig#21 — llvm: improve IR attributes and cast flags for better optimization").It descends cleanly from tag
0.15.2with 35 commits on top (3 merged PRs: oven-sh/zig#16, oven-sh/zig#17, oven-sh/zig#21), touching ~60 files (+1,641 / −812). The reported compiler version is still0.15.2— this is a Bun-tuned 0.15.2, not an upgrade to a newer Zig.1. LLVM codegen improvements (the headline — oven-sh/zig#21)
src/codegen/llvm.zig(+339),src/zig_llvm.cpp(+209),lib/std/zig/llvm/Builder.zig,ir.zig,src/codegen/llvm/bindings.zig,src/zig_llvm.h— richer IR attributes and integer/cast flags (nuw/nsw/trunccombinations, etc.) for better optimization.EnableSplitLTOUniton-flto.test/llvm_ir.zig(+90) and new behavior tests (cast/floatop/vector/widening).2. Target & linker additions
aarch64-windows-gnubuild target.arm64eTBD targets when linkingarm64(src/link/MachO.zig,src/link/MachO/Dylib.zig).compiler_rt); gatestrlenextern off the C backend.3. Language / tooling tweaks Bun relies on
@typeInfo" (src/Sema.zig).zig fmt"unprivate" flag + always-call-format-fn (lib/std/zig/Ast/Render.zig,src/fmt.zig).ZIG_PROGRESSis set (backport of Inherit build runner progress node from compiler if stderr is not a TTY ziglang/zig#24733).4. Downstream std patches ("our patches")
Broad edits to
lib/std/posix.zig(548 lines churned),fs/Dir.zig,mem.zig,mem/Allocator.zig(+15),os/windows.zig,os/linux.zig,Io/Writer.zig(+43), crypto (argon2,bcrypt), andBuild/Module.zig+Build/Step/Compile.zig(ano_link_objpath).5. Build system / CI / caching
ci.yamlwith.github/workflows/bun_build.yaml— Bun's matrix (macos / linux-musl / windows-gnu × {safe, debug}) built viazig-bootstrap, ReleaseSafe vs ReleaseFast variants, releases named by branch (so stable and-fastare distinguishable).out/host), several "fix build crash" commits, "skip lf flush when no link is set",CMakeLists.txt,build.zig, and a heavily trimmedREADME.md.Net assessment
A Bun-tuned 0.15.2 focused on better LLVM optimization/LTO, extra macOS/Windows target support, compiler introspection /
zig fmtconveniences, and a custom multi-target build/CI pipeline — layered on the unchanged 0.15.2 base.Branch pushed to
cataggar/zigasbun15. Comparison base: tag0.15.2(e4cbd752c8). Generated fromgit log/diff 0.15.2..bun15.