From bb84054fe767cdbf53d97f8fbd82a66a6b75749f Mon Sep 17 00:00:00 2001 From: James Pace Date: Wed, 10 Jan 2024 22:23:59 -0500 Subject: [PATCH] Ad just review. --- blog/quick_just_review.qmd | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 blog/quick_just_review.qmd diff --git a/blog/quick_just_review.qmd b/blog/quick_just_review.qmd new file mode 100644 index 0000000..0c483f1 --- /dev/null +++ b/blog/quick_just_review.qmd @@ -0,0 +1,42 @@ +--- +title: "Quick Review of Just" +author: "James Pace" +date: "2024/01/10" +draft: true +--- + +[Just](https://just.systems/man/en/) is a command runner that operates kind of like make, +if make was a command runner, not a build tool. + +When you call `just `, just looks for a `Justfile` in a parent directory, and does +whatever is under the `` entry in the file, where "things under" includes running a set +of bash commands or running a script that can be written inline. + +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`: +1. Doesn't require `.PHONY` targets for targets that don't produce any files. +2. Can be called below the directory the `Justfile` is in, and still find the `Justfile` + in the parent directory. + +In my recent development where I was doing development 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. + +I considered just using `make` for this application, but: + +1. Having to add .PHONY targets adds line noise that adds up. +2. I found being able to call `just` from any subdirectory really + convenient. \ No newline at end of file