2026-10-28 tooling update: mapal fmt supports explicit files in place,
--check, single-file --stdout, and stdin -. Eight integration tests pass,
including invalid-input no-write, atomic replacement, permissions, symlinks and
the existing interpreter command. Formatting runs without LLVM/GPU tools. Both
editor plugins invoke the same CLI over stdin and guard errors/stale buffers;
see their READMEs and tests under editors/.
Status: implemented
Last updated: 2026-10-22 · S62
Spec references: architecture.md §5 (Tooling ecosystem — mapal CLI / build integration) + HANDOFF §6 (repository layout — the mapal-cli crate provides mapal build|run|dump-ir|test). Supporting: architecture.md §2.3 (compiler driver); architecture.md §7.1 (typical dev cycle / mapal build).
Depends on: syntax, ir, lower, check, interp, rewrite, backend-llvm Depended on by: (none)
-
mapal build <f> [-o exe] [--emit-only]: host.ll+ link; on a GPU profile also.dev.lland.ptx(-mcpufrom the profile'sarch). -
mapal run <f>(compile + execute; exit code passes through) andmapal run --interp <f>(the oracle; 101 on a trap, as the compiled protocol). -
mapal dump-ir <f> --stage=lowered|rewritten|llvm|device. -
mapal test <f>: compiled (rewritten, Exact,-O2) vs the interpreter, exit code and stdout byte for byte. -
Every emitter flag and rung arm (
--target=,--gpu-off=,--gpu-on=,--move-panel=, ...) throughmapal_backend_llvm::flags. -
GPU builds under
hostopt(<gpu>+<host>profile name) resolve the device arch from the GPU half (fixed at integration; before, a panic).
- No CUDA on the host: a GPU build writes
.ll/.dev.ll/.ptxand exits 3. dump-ir --stage=lowered|rewrittenisDebugtext, no JSON.
- Diagnostics are rendered only here (syntax I5 / C3):
main.rs:frontend. testjudges the Exact face only;--contract/--precision=exit 2.
crates/mapal-cli/tests/examples.rs: 12 examplestestPASS at--target=generic; trap exit 101 both ways;dump-iremits@main;rtx-4090build writes the device unit and.target sm_89PTX.matmul128/matmul4096absent (oracle budget in debug),vectorabsent (P0001, not Core).
None — a tooling item; no codegen change.