Expand description
mos: command-line interface for the Mosaic typesetting engine.
Subcommands mirror manifest §15.1. mos check (read source → parse →
lower → resolve → report diagnostics) and mos build (the same, then
layout → PDF) are wired end-to-end; every other subcommand exits with an
error until its slice lands.
Structs§
- Cli 🔒
- Rendering
Sink 🔒 - A
DiagnosticSinkthat 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>.pdfor the project’s[output].pdf. Paper size and margins come from#set page(...); text uses the Base-14 fonts with the bundled Noto Sans embedded and subset for glyphs they lack. Layout warnings 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 🔒