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 lock-files generated by the JavaScript Bun (v1.2+) package manager to Nix expressions, which allows them to be consumed to build Bun packages reproducibly.

Advantages

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

  • Much faster than other similar lang2nix tools for the JavaScript ecosystem - a full install will only take around 50ms for a medium project with 2k packages
  • Build AOT-compiled 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: