Skip to main content

Module cli

Module cli 

Source
Expand description

Hand-rolled CLI argument parsing.

clap would add a multi-crate dependency tree. The demo binary only takes a handful of flags per subcommand, so a small, declarative parser keeps the surface area observable.

Each subcommand module exposes parse_and_run(args) which receives the tail of the argv (after the subcommand name) and returns an std::process::ExitCode. The parser itself is parse_flags, which walks --key value and --key=value forms and populates a tiny HashMap.

Modules§

audit_report
S-REAL.1 — Deterministic, no-JavaScript HTML audit report renderer.
bench
dsfb-gpu-debug bench — measure pipeline wall-clock on CPU and GPU.
bench_gpu_scale
dsfb-gpu-debug bench-gpu-scale — R.7 money-table headline benchmark
compare
dsfb-gpu-debug compare — compare two case files and emit a verdict.
generate_fixture
dsfb-gpu-debug generate-fixture — synthesize the canonical 10 000-event trace fixture and write it to disk in canonical-JSON form.
ingest
S-REAL.1 — Deterministic ingest of # residual-projection v2 TSV fixtures.
run_cpu
dsfb-gpu-debug run-cpu — run the CPU reference pipeline.
run_gpu
dsfb-gpu-debug run-gpu — run the CUDA-accelerated pipeline.
s_real_audit
S-REAL — Real Dataset Audit Gauntlet CLI driver (canonical subcommand: s-real-audit; historical alias: s-real-1-audit).

Functions§

parse_flags
Parse --key value, --key=value, and bare---key flag forms into a sorted map.
require_flag
Look up a required flag; emit a helpful error if it’s missing.
usage_error
Print a usage error to stderr and return the standard usage exit code.