My template repository of rust project
This file is referenced by rustup or Nix Flakes, in order to override rust toolchain on this repository. This is useful for sharing toolchain setup between project members.
Nix Flakes is a nix feature, which enables us to reproduce environment with ease. The files flake.nix
and flake.lock
are used by this feature.
direnv is used to load development environment of Nix Flakes quickly. To support non-nix users, .envrc
exits quickly without any changes if nix
not found in $PATH
.
GitHub Actions is already configured. In rust.yml
, cargo build
and rustfmt
and clippy
are checked using both rustup and Nix Flakes.