Project template for a rust project, as a nix flake with woodpecker CI
Find a file Use this template
2024-10-22 10:08:59 +02:00
.forgejo/default_merge_message Add rust template 2024-10-21 23:03:35 +02:00
.woodpecker Add rust template 2024-10-21 23:03:35 +02:00
src Add rust template 2024-10-21 23:03:35 +02:00
.envrc.recommended Add rust template 2024-10-21 23:03:35 +02:00
.gitignore Add rust template 2024-10-21 23:03:35 +02:00
Cargo.lock Add rust template 2024-10-21 23:03:35 +02:00
Cargo.toml Add rust template 2024-10-21 23:03:35 +02:00
flake.lock Add treefmt for code formatting 2024-10-21 23:57:40 +02:00
flake.nix Add treefmt for code formatting 2024-10-21 23:57:40 +02:00
justfile just: cleanup and a run recipe 2024-10-22 10:06:57 +02:00
README.md README: Document features of the template 2024-10-22 10:08:59 +02:00

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.