A local Markdown reader · rust + tauri
A quiet, file-focused Markdown reader and editor. One document at a time, rendered by the engine your OS already ships, parsed by Rust.
“Your files stay yours. No account, no cloud, no CDN in the render path.”
Rust · Tauri 2 · Comrak · syntect · KaTeX · Mermaid · WebKitGTK / WKWebView / WebView2
← → or space to navigate
02 // the choice
The file is a copy.
one is a product · one is a path
The file is the file.
That is the whole bet: the operating system already has a renderer, and the document — not the workspace — is the unit.
03 // constraints
Most editors grow by adding: sync, accounts, a plugin runtime, an embedded browser. Each one moves the source of truth or the render path off the machine. Folio rejects them at the door.
The filter is not a roadmap item. It is the reason the surface stays small enough to understand without learning a whole platform.
04 // architecture
Rust parses, sanitizes, themes and writes. Tauri is a typed boundary with a policy on every edge. The webview only draws what it is handed.
One window · one document · no node at run time
05 // rendering
GFM structures, fenced code, notes and footnotes — parsed in Rust, sanitized, then painted by the system webview.
// illustrative rendering pipeline let mut options = Options::default(); options.extension.table = true; options.extension.alerts = true; let html = markdown_to_html(source, &options)?; sanitize(html); // ammonia
| input | output | layer |
|---|---|---|
**bold** | bold | inline |
| a | b | | table | GFM |
- [x] | task | writable |
06 // previews
Code, tables, math and diagrams are rendered by the same local pipeline — then swapped in place as you move through the document.
Inline and display math, rendered from vendored files with throwOnError: false.
Eleven diagram types under securityLevel: strict. A broken source shows its source.
Raw HTML is reduced to a safe subset before it reaches the DOM.
07 // the parser
One Comrak configuration, one sanitizer, one highlight pass. A single source splits into blocks, inline spans and rendered output — nothing is fetched to do it.
Fenced code is highlighted by syntect in Rust. Invalid Mermaid shows its source with an error note instead of failing silently.
08 // trust boundary
referrerpolicy="no-referrer".data: links are removed.file: and about:srcdoc are rejected.data-sourcepos.
KaTeX uses restrictive trust; Mermaid runs at securityLevel: strict.
09 // the editing model
Edit mode is not a textarea with a preview beside it. The rendered document stays rendered; the line under your cursor reveals its Markdown in place.
The tide turns before the wind.
The tide turns before **the wind**.
Everything around it stays rendered.
— including this paragraph, and the block below.
fn main() { let greeting = "Hello from Folio"; println!("{greeting}"); }
10 // appearance
Omarchy detection is XDG-aware and hex-only: a palette value that isn't a plain
#rrggbb is rejected. Folio writes only its own preferences and never
modifies desktop theme files.
11 // file discipline
Saving a text file sounds solved until it happens over a network share, a synced folder, or another editor. Folio treats the write as a transaction.
Every line on the left has a Rust test behind it: conflict detection, atomic behaviour, CRLF/BOM and permission preservation, new-file umask, tolerant folder scanning.
12 // runtime
Fonts are shipped with the app, so the document doesn't reflow when the network disappears. The reader defaults to Source Serif 4; a command-window toggle switches the document to sans without touching the interface.
Diagrams are re-rendered when the theme changes, so they always match the palette — including a live Omarchy theme. Remote images stay a deliberate opt-in, never a default.
13 // verification
Save conflicts, file preservation, HTML sanitization, remote-image privacy and edit mapping. The parts that protect your work.
Playwright exercises the reading and editing UI: navigation, themes, unsaved changes and save conflicts. Native calls are mocked.
Real webview, CSP and cross-platform behaviour that a mock cannot cover — documented step by step in docs/manual-verification.md.
14 // scope
| target | builds | packages | hands-on |
|---|---|---|---|
| LinuxAppImage · .deb | passing | published | in use |
| macOSWKWebView | passing | not published | pending |
| WindowsWebView2 | passing | not published | pending |
CI compiles all three and runs the same checks. Only Linux releases are published, and only Linux has had a real desktop behind it long enough to claim.
Bounded on purpose: one document at a time, 20 MB, UTF-8, 5,000 tree entries.
The same reading experience, packaged for each desktop. Linux is available today; macOS and Windows still need hands-on validation.
15 // summary
Six modules, one system webview, zero cloud.
Your files stay yours. That sentence is the architecture.