-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathJustfile
More file actions
136 lines (103 loc) · 4.66 KB
/
Copy pathJustfile
File metadata and controls
136 lines (103 loc) · 4.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# 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
# Verify generated font metrics artifacts are current
font-metrics-check:
cargo +stable xtask font-metrics --profile mmdflux-sans-v1 --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, generated artifacts, compiles, lint, tests, and architecture policy
check: commit-check font-metrics-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 }}