src | ||
.envrc | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
flake.lock | ||
flake.nix | ||
README.md |
About
This is a minimal template for Rust development on the nightly channel.
Initialization
See the parent README for further instructions, but you can initialize this template with the following command in your current directory.
nix flake init -t github:MordragT/nix-templates#rust-nightly
Usage
nix develop
: opens up abash
shell with the bare minimum Rust toolset (cargo
&rustc
) by defaultnix build
: builds the Rust project. Outputs the binary to./result/bin/<name>
nix run
: runs the Rust program.
Reference
- wiki/Flakes
- Fenix - used for managing Rust toolchains (read the
makeRustPlatform
example) - rust-section of language frameworks - optional (use it for extending the template)