template-nix-rust/justfile

44 lines
711 B
Makefile
Raw Permalink Normal View History

2024-10-21 23:02:58 +02:00
set shell := ["/usr/bin/env", "bash", "-euo", "pipefail", "-c"]
2024-10-22 10:00:58 +02:00
export OTEL_SERVICE_NAME := "my-program"
2024-10-21 23:02:58 +02:00
[private]
default:
@just --choose
2024-10-22 10:00:58 +02:00
# Run
run $RUST_LOG="debug":
nix run
# Run local development
dev:
watchexec --clear --restart --stop-signal INT --debounce 300ms -- just run
2024-10-21 23:02:58 +02:00
# Run all tests
check:
nix flake check
# Lint all source code
lint:
2024-10-21 23:41:27 +02:00
cargo clippy
2024-10-21 23:02:58 +02:00
# Format all source code
fmt:
2024-10-21 23:41:27 +02:00
nix fmt
2024-10-21 23:02:58 +02:00
# Update all dependencies
2024-10-22 10:00:58 +02:00
update: update-nix update-rust-deps
2024-10-21 23:02:58 +02:00
# Update rust dependencies
update-rust-deps:
cargo upgrade --recursive
cargo update --recursive
# Update nix flake packages
2024-10-22 10:00:58 +02:00
update-nix:
2024-10-21 23:02:58 +02:00
nix flake update
# Find unused dependencies with cargo machete
machete:
cargo machete