Expand description
mos: command-line interface for the Mosaic typesetting engine.
Subcommands mirror manifest §15.1. MVP 0 wires mos check end-to-end
(read source → parse → lower → report diagnostics); the remaining
subcommands stay stubbed until layout (MVP 2) and the PDF backend
(MVP 0 §6 stage 9) land.
Structs§
- Cli 🔒
- Rendering
Sink 🔒 - A [
DiagnosticSink] that renders each diagnostic to stderr as it arrives and tracks error/warning counts. The CLI drives one of these across every phase and checksSelf::had_errorat each phase barrier; that, notSeverity::Erroritself, is what stops the build. - Resolved
Entry 🔒
Enums§
Constants§
- MAX_
PAGE_ 🔒FIXPOINT_ ITERATIONS - Cap on resolve↔layout rounds for page references before the engine gives up
and reports
MOS0047(issue #72). Stable documents settle in one or two rounds; the cap bounds pathological oscillation so the build always terminates.
Functions§
- clamp_
to_ 🔒char_ boundary - default_
entries 🔒 - display_
edit_ 🔒text - is_
mos_ 🔒source - main 🔒
- open_
pdf 🔒 - render_
diagnostic 🔒 - render_
span_ 🔒caret - render_
suggestion 🔒 - resolve_
entry 🔒 - resolve_
manifest_ 🔒output - run_
build 🔒 mos build: read source, parse, lower, lay out, and emit a PDF tobuild/<entry-stem>.pdf. MVP 0 produces a fixed-A4 document using the standard PDF base fonts (no embedding). Layout warnings (e.g. non-ASCII substitutions) print but don’t fail the build.- run_
builds 🔒 - run_
check 🔒 mos check: parse + lower the entry file and report diagnostics. Exits 0 if no errors (warnings still print); 1 otherwise.- run_
checks 🔒 - run_
many 🔒 - severity_
label 🔒 - should_
skip_ 🔒glob_ file - suggestion_
help 🔒 - suggestion_
text 🔒 - unimplemented_
subcommand 🔒