A reasonable way to start developing a reproducible Rust project
MIT License
A reasonable way to start developing a reproducible Rust project.
This reproducibility is enabled by Nix and Docker.
This is a template repository; everything is customizable, and some helpful defaults are included.
clippy-preview
: A collectionrust-src
rustc-dev
rustfmt
: A tool for formattingrust-analyzer
: Excellentcargo-watch
: Watches over yourcargo-edit
: Extends Cargo toCargo.toml
file from the command linenaersk
: Nix support for buildingoxalica/rust-overlay
: Pure anddocker compose
(recommended)docker compose build
docker compose up
docker compose
docker build . -t nix-rust-template
docker volume create nix-rust-template-vol
docker run --rm -it -v $PWD:/service nix-rust-template:latest
If you are using Docker, prefix the following with docker compose run --rm app
; for example:
docker compose run --rm app nix run .#watch
nix build
: build the packagenix run
or nix run .#app
: run the packagenix run .#watch
: watch the package for changes and rerunnix develop
: enter a reproducible rust shell environment
cargo watch -w "./src/" -x "run"