Zig 0.16.0 compiler, native tar extraction, persistent HTTP, O(1) resolver queue, and 15+ correctness fixes.
nb update # to v0.1.190
tree warm: Homebrew 2.38s → v0.1.083 23ms → v0.1.190 17ms
Apple Silicon (M-series), macOS, median of 3 runs — v0.1.083 vs v0.1.190 vs Homebrew
New std.Io threading model. Mach-O relocation (install_name_tool, codesign) now runs via real I/O — was silently failing with a stub allocator that returned OOM on every alloc.
Native Zig USTAR/GNU tar parser replaces tar xzf subprocess. No fork/exec for extraction. File permissions preserved exactly from mode bits.
Topological sort called orderedRemove(0) on every step — O(n²). Replaced with an index cursor: O(V+E) total. Noticeable on packages with 10+ transitive deps.
Auth token prefetched once before parallel workers start. HTTP client reused across all downloads. Head buffer bumped to 32 KiB, fixing truncated redirects.
15+ bugs addressed in this release
| Bug | Detail |
|---|---|
| Mach-O relocation | install_name_tool/codesign never ran — stub allocator OOM on first alloc |
| Non-atomic DB save | state.json written via temp + rename, safe against power-loss |
| Release tarball | Binary inside tarball is now named nb (was nb-arch-os), fixing nb update |
| UB in ReleaseFast | 6 files used direct .Exited field access — converted to exhaustive switch |
| ncurses man pages | walkAndReplaceText no longer skips man/ dir — placeholders now replaced |
| Unbounded threads | Download worker count capped at 8 |
| nb cleanup size | Reported hardcoded 10 MB regardless of actual bytes freed — fixed |