#cargo-build #nix-build #nix #build #cargo #ci #cache

build kolloch/crate2nix

crate2nix generates nix (as in NixOS) build files for rust using cargo

17 releases (breaking)

0.14.0 Apr 11, 2024
0.12.0 Dec 17, 2023
0.11.0 Oct 22, 2023
0.10.0 Jun 13, 2021
0.4.0 May 3, 2019

#490 in Unix APIs

317 stars & 11 watchers

Apache-2.0

140KB
3.5K SLoC

Rust 3K SLoC // 0.0% comments Tera 368 SLoC // 0.0% comments

crate2nix

crate2nix builds your cargo-based rust project crate-by-crate with nix.

You can

  • save time by only rebuilding changed crates hermetically in CI, and
  • use cargo/rust-analyzer locally for a fast developing loop.

➡️ Read more ⬅️

tests-nix-linux tests-nix-macos Crate


lib.rs:

crate2nix

Internal library for the crate2nix binary. This is not meant to be used separately, I just enjoy writing doc tests ;)

Repository

Dependencies

~10–22MB
~307K SLoC