Project scaffolding

This commit is contained in:
Daniel Lundin 2024-11-23 19:57:17 +01:00
parent 7b273c7245
commit af28c60984
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI
14 changed files with 1596 additions and 66 deletions

View file

@ -1,28 +1,43 @@
set shell := ["/usr/bin/env", "bash", "-euo", "pipefail", "-c"]
export OTEL_SERVICE_NAME := "my-program"
[private]
default:
@just --choose
# Run
run $RUST_LOG="debug":
nix run
# Run local development
dev:
watchexec --clear --restart --stop-signal INT --debounce 300ms -- just run
# Run all tests
test:
check:
nix flake check
# Lint all source code
lint:
echo FIXME: Add linter(s) here
cargo clippy
# Format all source code
fmt:
echo FIXME: Add formatter here
nix fmt
# Update all dependencies
update: update-nix-pkgs
update: update-nix update-rust-deps
# Update rust dependencies
update-rust-deps:
cargo upgrade --recursive
cargo update --recursive
# Update nix flake packages
update-nix-pkgs:
update-nix:
nix flake update
# Run local development
dev $OTEL_SERVICE_NAME="my-project":
watchexec --clear --restart --stop-signal INT --debounce 300ms -- nix run .
# Find unused dependencies with cargo machete
machete:
cargo machete