- Someone who wants to apply Nix's power for Rust development.
- Who's not very comfortable with Flakes (you still need to have a basic understanding)
- Need something minimal that just works™
- wiki/Flakes❗Read the output schema carefully (especially
defaultPackage
,legacyPackages
anddevShells
)❗ - Fenix - used for managing Rust toolchains (read the
makeRustPlatform
example) - rust-section of language frameworks - optional (use it for extending the template)
This repository has two branches
main
: normal verbose branch. For those who prefer explanationsnon-verbose
: you know your stuff and don't want explanations. You'll get a clean template with no comments
then click on the Use this template
button (https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template)
run nix flake update .
to update the flake lock
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.
... Waiting for questions ... (raise an issue in case of doubts)
Consider starring the repo ⭐🦀