FrankenMarkdown
5 hours ago
- #rust-wasm
- #pdf-generation
- #markdown-engine
- FrankenMarkdown is a Markdown engine built in Rust that renders Markdown to self-contained HTML and tagged PDF with zero third-party dependencies, ensuring a small audit surface.
- The engine uses WebAssembly to run directly in the browser, allowing for local rendering without a server. Documents can be shared via URL fragments with compression, enabling secure, serverless sharing.
- It features a single abstract syntax tree (AST) for both HTML and PDF output, maintaining consistency in themes, colors, and styling across formats.
- Key features include LaTeX-grade typography with the Knuth–Plass algorithm for optimal line breaking, deterministic byte-for-byte output, and font subsetting to embed only used glyphs for compact PDFs.
- The command-line interface is agent-friendly with stable exit codes and JSON output options, and it supports partial CommonMark coverage with intentional exclusions like raw HTML passthrough.