Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/facett

facett-docview/Cargo.toml

[package]
name = "facett-docview"
description = "facett — documentation viewer: render a Typst-authored manual exported as one vector SVG per page, in egui (pure Rust resvg/usvg/tiny-skia — no pdfium/native libs)"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
# Development notes, agent instructions and machine-local tooling stay in the
# repository; they are not part of the published crate.
exclude = [
    ".nornir/",
]

[features]
default = ["dejavu"]
# L4: functional-status emitter passthrough (see facett-core). No-op in release.
testmatrix = ["facett-core/testmatrix"]
# The airgap text font usvg shapes an SVG `<text>` against (2026-09-29). ON (default):
# the embedded DejaVu Sans, 760 KB — every native/demo build keeps it. OFF: egui's own
# Ubuntu-Light (read from egui::FontDefinitions::default(), the bytes egui already links), so a wasm
# bundle that wraps docview/manual (facet-wrapped) adds NO font bytes of its own.
dejavu = []

[dependencies]
facett-core = { path = "../facett-core", version = "0.3.0" }
egui = { workspace = true }
# FC-3: the observable Model derives Serialize/Deserialize (round-trippable state).
serde = { version = "1", features = ["derive"] }
serde_json = { workspace = true }
# Pure-Rust SVG parse + rasterize. Typst pages outline every glyph as a path, but
# SVGs with real `<text>` (skade's diagrams) need a font db or usvg DROPS the text,
# so we parse with a populated `usvg::Options.fontdb` (system fonts + an embedded
# DejaVu Sans fallback for airgap; see src/lib.rs `shared_fontdb`). The `text` +
# `system-fonts` features are on by default. resvg re-exports `usvg`, `usvg::fontdb`
# and `tiny_skia`, so this one dep pins the whole stack (no separate fontdb dep).
resvg = "0.47"
# Multi-core page work on the shared, barrier-free fork-join GATLING (the same engine
# facett-core rasterizes on): parse every page on its own core at construction,
# fetch+parse the lazy band in parallel, and rasterize the visible band one page per
# core — so a fat manual opens and scrolls without serial per-page stalls. Workers
# self-dispatch off one atomic counter (no barrier, no global pool) and each renders
# a DISJOINT page into its own image (no shared state, zero-copy index hand-off).
# usvg 0.47 is Arc-based (Tree: Sync), so every page unit is data-parallel with no
# extra synchronization. On wasm `available_parallelism()` is 1 → the serial fast
# path runs (no `thread::scope`), so this stays wasm-clean like the rest of facett.
znippy-zoomies = { path = "../../znippy-zoomies", version = "0.1.26" }

[dev-dependencies]
# CPU render-proof (AccessKit tree + live state_json) via the kittest harness: the
# robot scenario renders the REAL DocView body over a synthetic SVG book and
# asserts the sidebar/continuous/paged/search capabilities reach the surface. No
# wgpu needed — every page is a pure egui-painter draw, snapshottable headlessly.
egui_kittest = { version = "0.36" }