Just: A quick review
Just is a command runner that operates kind of like make.
Just lets you define tasks in a simple, human-readable file called a Justfile. To run a task, simply call just <task_name>. Just will automatically find the Justfile in the nearest parent directory and execute the commands defined for that task.
For example, given the Justfile:
build:
cargo build
test:
cargo test --features log
the command just test will call cargo test --features log in the current terminal window.
Compared to make, just:
- Eliminates the need for manual .PHONY target creation, saving you time and reducing clutter in Justfiles compared to Makefiles.
- Can be called below the directory the
Justfileis in and still find theJustfilein the parent directory.
In my recent development where I was calling wasm written in rust in a web app, I found just particularly useful. Building the app took multiple commands, one command for compiling the rust part and a second command to bundle the JavaScript.
Combining things under a single just target was nice and lead to quicker iterations.