Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Bun2Nix

Bun2nix Logo

Bun2nix is a fast rust based tool for converting lockfiles generated with the JavaScript Bun (v1.2+) package manager files to Nix expressions, which allows them to be consumed to build Bun packages reproducibly.

Advantages

Here are some of the advantages of using bun/bun2nix over the alternatives:

  • Much faster than other similar lang2nix tools for the javascript ecosystem - a full cached install will only take around 50ms for a medium project with 2k packages
  • Build aot complied binaries easily with bun that fit the nix model much better than npm scripts
  • Quality error messages because of the static types in rust

Alternatives

Here are some alternatives to bun2nix in the JavaScript ecosystem which fulfill a similar purpose: