FrankenMarkdown — The Monster Markdown Engine
Skip to the playground
GitHub
Menu
LAB_MENU
Playground<br>Pipeline<br>Typography<br>Features<br>Install<br>GitHub
V0.3.0 Alive on Crates.io
The
Monster
Markdown<br>Engine.
Stitched together from a clean-room parser, LaTeX-grade typesetting, and a<br>hand-rolled PDF writer — one auditable Rust core with<br>zero dependencies that renders<br>Markdown to beautiful self-contained HTML and compact tagged PDF.<br>Natively, and in this very page via WASM. Byte-for-byte identical.
TRY THE PLAYGROUND
GET STARTED
VIEW SOURCE
fmd_render_stream
Live Session
Core Crates
0deps
Engine Dependencies
the core is 100% our Rust
Native ↔ WASM Parity
100%
byte-identical HTML + PDF, gated in CI
CommonMark Ratchet
379
conformance floor that can only rise
WASM Payload
1.5MB gz
fonts, highlighter & PDF writer included
SPECIMEN_001 · LIVE EXPERIMENT
The Operating Theater.
Type Markdown on the left. The actual engine — compiled to WebAssembly,<br>running in a worker in your browser — renders it on the right. Flip the switch<br>to typeset the same document as a PDF. No server. No mock. The monster itself.
fmd_playground
PARITY_100%<br>DETERMINISM_LOCKED
REANIMATING…
Maximize
Sample<br>Showcase<br>Code<br>Tables
HTML<br>PDF
Font
sans<br>serif
Dark CSS
auto<br>disabled
PDF Line №
↓ HTML<br>↓ PDF<br>⚡ Share
source.md<br>0 B
self_contained.html<br>RENDERED_IN_BROWSER
Inline PDF viewing unavailable in this browser
OPEN THE PDF
Diagnostics
⚡ Serverless sharing — the document is the link
Share compresses your Markdown with deflate, base64url-encodes it,<br>and packs it into the # fragment of the URL — like<br>franken-markdown.com/#view=max&zdoc=….<br>Nothing is uploaded, stored, or logged: URL fragments are never even sent to the server, and this<br>site has no backend anyway. Whoever opens your link gets the exact document, decompressed and<br>re-typeset locally by the same wasm engine. Documents up to roughly 30 KB of URL travel well<br>in every modern browser.
Deep links
The playground itself is linkable. Fragment parameters compose:
/#view=max — open the playground maximized, full page
/#fmt=pdf — start on the PDF pane
/#zdoc=… — deflated + base64url document payload
/#doc=… — plain base64url payload (no compression)
The playground needs JavaScript + WebAssembly. The rest of the page works fine without them.
SUBSYSTEM_MAP
One AST. Every Organ.
Parse once; render everywhere. HTML, PDF, and WASM read the same tree and the<br>same typed theme, so the surfaces can never drift apart. Click a stage to dissect it.
markdown<br>file · stdin · string
clean-room parser<br>byte-level scanner
document AST<br>one parse, many bodies
theme model<br>colors · spacing · page
HTML emitter<br>self-contained page
layout + PDF writer<br>Knuth–Plass · tagged
WASM ABI<br>this page, right now
VITAL_ORGANS
Built Different.
Every organ in the render path — parser, highlighter, font reader, line breaker,<br>compressor, PDF writer — was grown in this lab, for this exact workflow.
One AST, Two Bodies
HTML and PDF render from the same parse and the same typed theme. Colors, spacing, code styling, and document rhythm stay coherent across surfaces — structurally, not by convention.
Zero-Dependency Core
No comrak, no syntect, no PDF crates, no regex engine. The engine compiles with zero third-party crates (clap exists only for the CLI), enforced by a CI policy gate. Tiny audit surface, fast builds.
Deterministic Bytes
Fixed input + fixed options = identical output bytes, across runs and operating systems. SOURCE_DATE_EPOCH pins PDF dates; CI diffs repeated renders byte-for-byte. Perfect for reproducible builds and caching.
LaTeX-Grade Typography
Knuth–Plass optimal paragraph breaking, Liang hyphenation, real font metrics, GPOS kerning, GSUB ligatures, and measured-column tables. PDF output that reads like it was typeset, because it was.
Clean-Room Highlighter
Rust, Python, JS/TS, JSON, shell, PowerShell, Go, C/C++, TOML, YAML, SQL, HTML/SVG, CSS, Markdown, and Mermaid — one hand-written highlighting model shared by HTML and PDF. Diagram-shaped ASCII keeps its geometry.
Agent-First CLI
The first command an agent guesses works: fmd README.md. Stdout is data, stderr is diagnostics, exit codes are stable, and capabilities --json, doctor --json, and robot-docs expose the whole contract.
TYPE_LAB
Typeset Like TeX.
Word processors break lines greedily: fill until full, wrap, repeat — and one bad<br>line poisons the paragraph. FrankenMarkdown's PDF path uses the Knuth–Plass<br>total-fit algorithm: it considers every possible set of breakpoints and picks<br>the one that minimizes ugliness across the whole paragraph. This demo runs both<br>algorithms live. Drag the measure and watch the line tinting: the hotter a line, the<br>more its spaces were stretched or squeezed.
Line width
492px measure
Greedy (first-fit) — what most tools do
Knuth–Plass (total-fit) — what fmd does
comfortable spacing<br>stretched<br>abused<br>— hover any line for its adjustment ratio and badness. Same font,...