meta: set up Just for general maintenance tasks
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I16a6121ab52fbc732a56720f622321496a6a6964
This commit is contained in:
parent
035825a402
commit
f55edcdedd
2 changed files with 46 additions and 5 deletions
40
justfile
Normal file
40
justfile
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
# Default recipe to show help
|
||||||
|
@default:
|
||||||
|
just --list
|
||||||
|
|
||||||
|
# Build all crates
|
||||||
|
build-all: build-server build-tui build-ui
|
||||||
|
|
||||||
|
# Build the server crate
|
||||||
|
build-server:
|
||||||
|
cargo build -p pinakes-server
|
||||||
|
|
||||||
|
# Build the TUI crate
|
||||||
|
build-tui:
|
||||||
|
cargo build -p pinakes-tui
|
||||||
|
|
||||||
|
# Build the UI using Dioxus CLI. The UI *has* to be built with `dx`, because CSS
|
||||||
|
# is not correctly embedded otherwise.
|
||||||
|
build-ui:
|
||||||
|
dx build -p pinakes-ui
|
||||||
|
|
||||||
|
# Generate REST API documentation using cargo xtask
|
||||||
|
@docs:
|
||||||
|
cargo xtask docs
|
||||||
|
|
||||||
|
# Run all tests
|
||||||
|
@test:
|
||||||
|
cargo nextest run --workspace
|
||||||
|
|
||||||
|
# Format code
|
||||||
|
@fmt:
|
||||||
|
cargo fmt
|
||||||
|
|
||||||
|
# Run clippy linting
|
||||||
|
@lint:
|
||||||
|
cargo clippy --workspace
|
||||||
|
|
||||||
|
# Clean build artifacts
|
||||||
|
@clean:
|
||||||
|
cargo clean
|
||||||
|
rm -rf target/dx/
|
||||||
|
|
@ -26,21 +26,22 @@ in
|
||||||
name = "pinakes-dev";
|
name = "pinakes-dev";
|
||||||
packages =
|
packages =
|
||||||
[
|
[
|
||||||
# Build tools
|
|
||||||
# We use the rust-overlay to get the stable Rust toolchain for various targets.
|
# We use the rust-overlay to get the stable Rust toolchain for various targets.
|
||||||
# This is not exactly necessary, but it allows for compiling for various targets
|
# This is not exactly necessary, but it allows for compiling for various targets
|
||||||
# with the least amount of friction.
|
# with the least amount of friction. The extensions are to make sure all tooling
|
||||||
|
# uses the same Rust version and the general surrounding tooling.
|
||||||
(rust-bin.nightly.latest.default.override {
|
(rust-bin.nightly.latest.default.override {
|
||||||
extensions = ["rustfmt" "rust-src" "rust-analyzer" "clippy" "rust-analyzer"];
|
extensions = ["rustfmt" "rust-src" "rust-analyzer" "clippy" "rust-analyzer"];
|
||||||
targets = ["wasm32-unknown-unknown" "wasm32-wasip1"]; # web + plugins
|
targets = ["wasm32-unknown-unknown" "wasm32-wasip1"]; # web + plugins
|
||||||
})
|
})
|
||||||
|
|
||||||
# Modern, LLVM based linking pipeline
|
# Modern, LLVM based linking pipeline. Kind of sucks on Windows, though.
|
||||||
llvmPackages.lld
|
llvmPackages.lld
|
||||||
llvmPackages.clang
|
llvmPackages.clang
|
||||||
|
|
||||||
# Handy CLI for packaging Dioxus apps and such
|
# CLI helpers
|
||||||
pkgs.dioxus-cli
|
pkgs.dioxus-cli # for packaging Dioxus apps and such
|
||||||
|
pkgs.just # general command runner for everything
|
||||||
|
|
||||||
# Additional Cargo Tooling
|
# Additional Cargo Tooling
|
||||||
pkgs.cargo-nextest
|
pkgs.cargo-nextest
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue