facett-docview — crate card
Reverse-engineered (from source — verify, don't trust the name)
- One-line pitch: A pure-Rust documentation viewer that renders a Typst-authored manual (one vector SVG per page) inside egui — no pdfium / no native libs.
- Does:
DocViewshows a scrollable manual with a TOC sidebar and zoom. Each page (DocPage::from_svg_bytes) is parsed once via usvg at construction; visible pages rasterize on demand through resvg/tiny-skia into an egui texture. Uses a sharedArcfontdb (system fonts + embedded DejaVu Sans fallback) so real<text>SVGs (skade diagrams) render even airgapped. Texture cache keyed by (page, zoom bucket); rayon parses/rasterizes pages per-core. Zoom clamped MIN/MAX, tex dim clamped 4096. - Key deps:
facett-core(Facet),egui,resvg0.47 (re-exports usvg/usvg::fontdb/tiny_skia — pins the whole SVG stack),rayon(data-parallel page work). - Shape: lib, single module (~1200 lines). Key types:
DocPage,PageSourcetrait,DocView. - Observed role in the workspace: The offline manual viewer component (nordisk airgap ethos). Consumes SVGs a host exports from Typst; drops into a FacetDeck.
Fill in (one line each — only the human knows these)
- Primary consumer(s):
- Why it exists (vs the obvious alternative):
- Hard constraint (airgap / no-C-deps / no-FFI / pure-Rust / etc.):
- Release cadence & independence (rides a parent? own repo someday?):
- Status (production / prototype / experimental / stubbed):
- Must-NOT-change invariant:
- Biggest known gap or TODO:
- Anything a newcomer would get wrong about it: