This template uses Nix to create a sane development shell for Rust projects, Standard for keeping your Nix code well organized, Fenix for pulling the latest rust binaries via Nix, and Crane for building Rust projects in Nix incrementally, making quick iteration a breeze.
Rust Analyzer is also wired up properly for immediate use from a terminal based editor with language server support. Need one with stellar Nix and Rust support? Try Helix!
# make a new empty project dir mkdir my-project cd my-project # grab the template nix flake init -t github:divnix/std#rust # do some inititialization git init && git add . # enter the devshell direnv allow || nix develop # continue some inititialization cargo init # pass --lib for library projects cargo build # to generate Cargo.lock git add . && git commit -m "init"