Jump to navigation Jump to search
Installing Rust with Nix[edit | edit source]
- The NixPkgs stock repository has a rust package, though it often lags behind by a version or two
- nixpkgs-mozilla has an overlay with functions to download arbitrary Rust builds
Building Rust software with Nix[edit | edit source]
NixPkgs has two functions for building code with the Rust toolchain.
- rustPlatform.buildRustPackage invokes
cargowith an appropriate environment.
- rustPlatform.buildRustCrate invokes
rustcdirectly to build a crate.
Tutorials[edit | edit source]
- Nix MozJS Tutorial: how to use crate2nix to build a complicated Rust application directly with Nix.