A cargo builder that uses the buildRustCrate from the nix package manager.

This yields the following benefits: - Sandbox builds: A malicious dependency in project A cannot alter the filesystem or inject source code into libraries that will affect the build of another project B. - Shared cache: If project A has a dependency on some crate, let's say tokio, with features macros and rt, then this builder will cache each dependency individually. So if project B also uses tokio with the same features and version, then the tokio dependency will not be rebuild. - Reproducible: Given the same version and targets, any project will build exactly the same on different machines.

Install

shell cargo install cargo-nbuild

:warning: The nix package manager needs to be installed on your system.

Usage

From a Rust project run

shell cargo nbuild

Missing

This builder is still in early days and is missing features