Skip to main content

Crate mos

Crate mos 

Source
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 🔒
RenderingSink 🔒
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 checks Self::had_error at each phase barrier; that, not Severity::Error itself, is what stops the build.
ResolvedEntry 🔒

Enums§

Command 🔒
PdfOpen 🔒

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 to build/<entry-stem>.pdf or 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 🔒