Nanobrew: The fastest macOS package manager compatible with brew

https://nanobrew.trilok.ai/

nanobrew

The fastest macOS package manager. 3.5ms warm installs. Written in Zig.

This might be a good thing for homebrew to adopt for the download/install process, but if it doesn't include a ruby interpreter, I have a hard time seeing how it's going to be compatible with anything but searching and installing bottles. I install most of my packages from a Brewfile, which itself is Ruby code.

If it doesn’t ever execute Ruby: it cannot be compatible with Homebrew. “Compatible” is doing a bit of work here when it also means “implicitly relies on Homebrew’s CDN, CI, packaging infrastructure and maintainers who keep all this running”.

There’s a new vibe coded Homebrew frontend with partial compatibility and improved speed every few weeks.

Homebrew is working on an official Rust frontend that will actually have full compatibility. Hopefully this will help share effort across the wider ecosystem.

It is really coll that Homebrew provides a comprehensive enough JSON API to let people build on Homebrew in useful ways without directly running Ruby, despite everything being built in a Ruby DSL. That really does seem like a "best of both worlds" deal, and it's cool that alternative clients can take advantage of that.

I didn't know about the pending, official Rust frontend! That's very interesting.

Wow they are finally getting away from Ruby? Awesome. The speed will be a nice boon

Heyyyy, who are you to tell us what is and isn't compatible with homebrew?

(Just kidding, thank you for creating homebrew and your continued work on it!)

I appreciate the push for an official rust frontend. I've personally been migrating (slowly) to using nix to manage my Mac's software, but there are a ton of limitations which lead me to rely on homebrew anyway. The speed ups will be appreciated.
This feels like a solution looking for a problem. I have a couple hundred brew packages on my system and I’ve never sat there thinking “If this was only 2 seconds faster…” while doing an update. I’m sure the Homebrew folks could mine this for a few ideas of how to further optimize brew, but I don’t think I’ll be adopting it anytime soon. Compatibility is more important than speed in this case.
If you use the Homebrew module for Nix-Darwin, running `brew` against the generated brewfile becomes the slowest part of a `darwin-rebuild switch` by far. In the fast cases, it turns something that could take 1 second into something that takes 10, which is definitely annoying when running that command is part of your process for configuration changes even when you don't update anything. Homebrew no-ops against an unchanging Brewfile are really slow.

Horses for courses, but I've stopped using brew 'cuz it's too slow, so this might bring me back!

Edit: no, it won't...

Agreed on horses for courses. Different people have different tolerances. And yea, all things being equal, faster is better, but they are almost never equal. If you don’t mind me asking, what does “too slow” mean for you in this context? Do you have a particularly complex setup? And what do you use now as an alternative and how has that impacted the update speed?

> I’ve never sat there thinking “If this was only 2 seconds faster…” while doing an update

I definitely have thought something along those lines (mostly when I go to install a small tool, and get hit with 20 minutes of auto-updates first).

Pretty sure I also will not be adopting this particular solution, however

I've never thought "only 2 seconds faster" - I've certainly thought "why is this taking half the time it takes Gentoo to recompile an entire server".
FWIW this seems to have improved in recent years. Back in the dark times of non parallelized downloads I would purposefully wait to end of day and fire the thing off before leaving

But you can turn that behavior off, IIRC it tells you the environment variable to set if you don’t want it to do that every time it runs.

I agree it’s annoying, but I haven’t turned it off because it’s only annoying because I’m not keeping my computer (brew packages) up-to-date normally (aka, it’s my own fault).

Terrible default behavior is a great reason to abandon a software package.
I'd be much happier if it were on a background job, than arbitrarily running when I invoke a command
My brew update/upgrade takes forever
The same criticism has been said of Deno and Pnpm and bun, and yet, despite all these years since their respective releases, node and npm remain slower than all three options.
Well, pnpm solves the storage issue, which is a more pressing reason to use it. (I don't know about deno/bun)

What would be great is a Homebrew-compatible system that doesn't cut off support for older machines. I have a 3.8 GHz Quad core i5 iMac that still crushes, yet Homebrew has determined that I'm just too old and icky[1] to work with anymore. I had to move over to MacPorts, which is surprisingly nice, but I still miss brew.

Yea, I know. It's open source. They can do what they want. Still sucks.

1: https://docs.brew.sh/Support-Tiers

Support Tiers

Documentation for the missing package manager for macOS (or Linux).

Homebrew Documentation
If we get the Bun-ification of every package manager and language ecosystem that would be an awesome thing. This is a great trend.