Skip to main content

Offline documentation

The build_docs binary builds offline-readable PDFs into manuals/ (gitignored). It's all RustTypst renders the PDF as a library and the image crate handles screenshots, so there's no pandoc, LaTeX, or Python to install. It produces two manuals, selected by the first word:

cargo run --bin build_docs                 # Developer Manual (default)
cargo run --bin build_docs -- user # User Manual
cargo run --bin build_docs -- all # purge manuals/ + rebuild every variant
  • Developer Manual — everything: the repository README, the full gh-pages user + developer guides and blog, and an architecture walkthrough of the code. Book-like (Cardo serif). → manuals/Local Desktop - Developer Manual.pdf
  • User Manual — the gh-pages user guide and blog, with screenshots, styled to feel like the website (Lato sans, teal accents). → manuals/Local Desktop - User Manual.pdf

Extra knobs (words, in any order):

  • Page sizedesktop (default, A4), fold (near-square 130×150mm, for a foldable's inner screen), or phone (narrow/tall ~90×190mm, for a normal mobile phone).
  • dark — User Manual only: the website's dark "northern lights" theme (dark page, light text, bright-teal accents, dark code blocks).
  • callgraph — Developer Manual only: replace the hand-written architecture walkthrough with one generated by actually walking the call graph from the seed functions. See the two architecture modes below.
cargo run --bin build_docs -- callgraph fold      # developer, call-graph, fold page
cargo run --bin build_docs -- user dark # user manual, dark theme
cargo run --bin build_docs -- user phone dark # user manual, dark, phone page

all regenerates the full set, so manuals/ only ever holds the latest build: Local Desktop - {Developer,User} Manual [(Call Graph|Fold|Phone[, Dark])].pdf.

The User Manual ships as release artifacts in 6 variants — every size (desktop/fold/phone) × theme (light/dark) — attached alongside the APK/AAB as Local-Desktop-v<version>-User-Manual[-Fold|-Phone][-Dark].pdf. The app also pre-downloads the matching desktop/light manual onto the Linux desktop as Local Desktop - User Manual.pdf.

The Developer Manual's architecture part comes in two modes:

  • curated (default) — a hand-written walkthrough (docs/architecture.md) that flattens the program along its call stack: android_main → the WebView and Wayland backends → the xbuild and build_apk build paths. Readable and story-shaped; the code in each snippet is pulled fresh from source on every build, so it can't drift.
  • callgraph — generated by actually walking the call graph from the seed functions (see SEEDS in src/bin/build_docs.rs). Exhaustive but mechanical; being lexical and intra-crate, it can't see trait/dyn dispatch and resolves same-name methods heuristically.

The tool is host-only (#[cfg(not(target_os = "android"))] deps), so it never affects the Android app build.