# List available recipes
default:
@just --list
# Run all tests
test *args:
cargo +stable nextest run {{ args }}
# Run all tests (CI mode: no fail-fast, verbose)
test-ci *args:
cargo +stable nextest run --profile ci {{ args }}
# Run a specific test file (e.g. just test-file integration)
test-file name *args:
cargo +stable nextest run --test {{ name }} {{ args }}
# Build (debug)
build *args:
cargo +stable build {{ args }}
# Build (release)
release *args:
cargo +stable build --release {{ args }}
# Run clippy, architecture boundaries, and fmt check
lint: fmt-check
cargo +stable xtask lint
# Run clippy with auto-fix
fix *args: fmt
cargo +stable clippy --fix --workspace --all-targets --all-features --allow-dirty --allow-staged -- -D warnings {{ args }}
# Format code
fmt *args:
cargo +nightly fmt --all {{ args }}
fmt-check:
cargo +nightly fmt --all -- --check
# Regenerate the cspell dictionary from the Codebook dictionary
spell-sync:
node scripts/sync-cspell-dictionary.mjs
# Verify the cspell dictionary matches the Codebook dictionary
spell-sync-check:
node scripts/sync-cspell-dictionary.mjs --check
# Run cspell using the generated Codebook dictionary
spell-check +args: spell-sync
mise x -- cspell lint --config cspell.config.yaml {{ args }}
# Install git hooks (commit-msg validation via cocogitto)
setup-hooks:
cog install-hook --all --overwrite
# Check commit messages on the current branch
commit-check range='origin/main..HEAD':
cog check "{{ range }}"
# Run the CLI
run *args:
cargo +stable run -- {{ args }}
# Generate a Mermaid dependency map for the Rust crate
module-map *args:
./scripts/module-deps/flowchart.mjs {{ args }}
# Generate a Mermaid C4 dependency map for the Rust crate
module-map-c4 *args:
./scripts/module-deps/c4.mjs {{ args }}
# Generate a Mermaid SCC-condensed dependency DAG for the Rust crate
module-map-scc *args:
./scripts/module-deps/scc.mjs {{ args }}
# Generate an outbound dependency tree rooted at a module
module-map-outbound module *args:
./scripts/module-deps/pivot.mjs --module {{ module }} --direction outbound --mode tree {{ args }}
# Generate an inbound dependency tree rooted at a module
module-map-inbound module *args:
./scripts/module-deps/pivot.mjs --module {{ module }} --direction inbound --mode tree {{ args }}
# Generate a pivoted SCC-condensed dependency DAG around a module
module-map-pivot-dag module *args:
./scripts/module-deps/pivot.mjs --module {{ module }} --direction both --mode dag --condense-scc {{ args }}
# Run MMDS conformance checks (semantic/layout/visual tiers)
conformance *args:
cargo +stable nextest run --test mmds_conformance --success-output immediate {{ args }}
# Check commit messages, compiles, lint, tests, and architecture policy
check: commit-check lint test
# Build wasm bindings for browser and bundler targets
wasm-build:
wasm-pack build crates/mmdflux-wasm --target web --dev --out-dir ../../target/wasm-pkg-web
wasm-pack build crates/mmdflux-wasm --target bundler --dev --out-dir ../../target/wasm-pkg-bundler
# Run the full repo architecture suite.
architecture:
cargo +stable xtask architecture
# Run the semantic boundaries check.
architecture-check:
cargo +stable xtask architecture check
# Watch semantic boundaries during larger refactors and host results for one-shot reuse.
architecture-host:
cargo +stable xtask architecture host
# Print the semantic boundary dependency graph as Mermaid.
architecture-graph:
cargo +stable xtask architecture graph
# Explain a specific edge or boundary in the semantic dependency graph.
architecture-explain *args:
cargo +stable xtask architecture explain {{ args }}
# Build size-optimized release wasm bindings for browser and bundler targets
wasm-build-release:
CARGO_PROFILE_RELEASE_OPT_LEVEL=z CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 CARGO_PROFILE_RELEASE_LTO=fat CARGO_PROFILE_RELEASE_PANIC=abort wasm-pack build crates/mmdflux-wasm --target web --release --out-dir ../../target/wasm-pkg-web
CARGO_PROFILE_RELEASE_OPT_LEVEL=z CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 CARGO_PROFILE_RELEASE_LTO=fat CARGO_PROFILE_RELEASE_PANIC=abort wasm-pack build crates/mmdflux-wasm --target bundler --release --out-dir ../../target/wasm-pkg-bundler
# Run browser-executed wasm-bindgen contract tests
wasm-test:
just wasm-build
./scripts/run-wasm-browser-tests.sh
# Build release wasm artifacts and enforce CI-equivalent size budgets
wasm-size *args:
./scripts/check-wasm-size.sh {{ args }}