HeadlinesBriefing favicon HeadlinesBriefing.com

Nanobrew: 7000x Faster macOS Package Manager

Hacker News •
×

Nanobrew is a new macOS package manager written in Zig that claims to be 7,000 times faster than Homebrew. The tool achieves 3.5ms install times for warm installs through clever use of APFS clonefile for copy-on-write materialization and parallelized operations across dependency resolution, downloading, extraction, and linking.

Installation is straightforward: users run a curl command to download and install the single 2MB static binary. The package manager works on Apple Silicon and macOS 15, using a content-addressed store keyed by SHA256 for deduplication. This means reinstalls skip downloading and extraction entirely, while the APFS clonefile syscall provides zero disk overhead per install.

The performance gains come from multiple optimizations. Nanobrew replaces curl subprocesses with Zig's native HTTP client, reads binary headers directly without otool, and uses a single static binary instead of a Ruby runtime. The tool resolves dependencies using BFS parallel resolution across concurrent API calls, and everything from downloads to extraction runs concurrently. For developers frustrated with Homebrew's speed, Nanobrew offers a compelling alternative that maintains compatibility while delivering near-instantaneous package management.