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. 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 🔒
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. 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 🔒