dev: setup flake
Set up a nix flake using crane.
- Use
nix build .
to build the project. The resulting binary is found under./result/bin
- If the build fails with an error that
Cargo.lock
needs to be updated, runcargo update
to update all dependencies.
- If the build fails with an error that
- Use
nix flake check
to run all checks. This includes:- Unit tests
- formatting
- dependency auditing
- license checks
- documentation tests
-
clippy
checks
- Use
nix develop
to spawn a dev shell- alternatively, direnv support is given using an
.envrc
- alternatively, direnv support is given using an
Edited by Mia Mallon