From cdd829199f7d361167223c355e4f7ec4c59e7ccf Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Tue, 27 Jan 2026 13:49:36 -0700 Subject: [PATCH] build: Created justfile to make life easier --- CONTRIBUTING.md | 3 ++- justfile | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 justfile diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bed4fd8..cb827fb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,7 +48,8 @@ cz commit 1. Clone this repo 2. Run `cargo test` to set up hooks 3. Make changes -4. Run the application using `make run` or `cargo run` +4. Run the application using `just run` or `just run` + - Install `just` (`cargo install just`) if you haven't already to use the [justfile](./justfile) in this project. 5. Commit changes. This will trigger pre-commit hooks that will run format, test and lint. If there are errors or warnings from Clippy, please fix them. 6. Push your code to a new branch named after the feature/bug/etc. you're adding. This will trigger pre-push hooks that diff --git a/justfile b/justfile new file mode 100644 index 0000000..639a771 --- /dev/null +++ b/justfile @@ -0,0 +1,25 @@ +# List all recipes +default: + @just --list + +# Run all tests +[group: 'test'] +test: + cargo test --all + +# See what linter errors and warnings are unaddressed +[group: 'style'] +lint: + cargo clippy --all + +# Run Rustfmt against all source files +[group: 'style'] +fmt: + cargo fmt --all + +# Build the project for the current system architecture +# (Gets stored at ./target/[debug|release]/loki) +[group: 'build'] +[arg('build_type', pattern="debug|release")] +build build_type='debug': + @cargo build {{ if build_type == "release" { "--release" } else { "" } }}