template-nix-rust/README.md

1.7 KiB

My Rust Project

This is an opinionated template for rust projects using Nix.

Template features

  • CI template for Woodpecker.
  • Forgejo commit message templates.
  • Linting and formatting.
  • Nix-centered development environment.
  • Include language servers and all tooling in Nix dev shell.

Rust Opinions

Dev tools by default

  • direnv for automatic dev shell activation.
  • Bacon - automatic and minimal interaction code checker.
  • cargo-machete for removing unused dependencies.
  • hyperfine for simple benchmarking.
  • just for running things and discovery.
  • watchexec (and cargo-watch) for watching files and running commands.

Nix opinions

  • Crane for incremental artifact builds and nice set of checks.
  • Advisory-db for automatic checking of vulnerabilities of dependencies.
  • nix-filter allows filtering out files from the source input for a project.
  • treefmt supports automatic code formatting of all kinds of source code.