Convert Markdown into PDF through an explicit Rust pipeline. Minimal and Typst backends, configurable themes, math & mermaid support.
A Rust library that gives you full control over Markdown-to-PDF conversion — from parsing to rendering.
Choose between a lightweight Minimal renderer (zero system dependencies) or the powerful Typst backend for professional typesetting with fonts, layouts, and math.
Built-in themes (Professional, Engineering, Scientific Article, Invoice, Informational) plus full JSON overrides for fonts, colors, and sizes.
GFM math ($...$, $$...$$) with TeX-subset conversion for real Typst rendering. Rust-native Mermaid diagram subset — no Node, no npm.
Chain .from_text() → .to_file() → .with_theme() → .convert(). Everything is type-safe and composable.
No panicking .expect() in production. Paths sanitized. Secrets scanned before every release. Built with a layered architecture (api → pipeline → core → adapters).
Free for personal and commercial use. Contributions welcome! Fork, improve, and submit a PR on GitHub.
Convert Markdown to PDF in 4 lines of Rust.
// Cargo.toml
// glyphweaveforge = "0.1"
use glyphweaveforge::Forge;
fn main() {
let pdf = Forge::new()
.from_text("# Hello World\n\nThis is **Markdown**.")
.to_memory()
.convert()
.expect("conversion should succeed");
assert!(pdf.bytes.expect("bytes present").starts_with(b"%PDF"));
}
Full Getting Started Guide →
| Feature | Minimal | Typst |
|---|---|---|
| Headings, paragraphs, lists | ✓ | ✓ |
| Bold, italic, code, links | ✓ | ✓ |
| Tables | ✓ | ✓ |
| Code blocks with language | ✓ | ✓ |
| Images (inline & HTML) | ✓ | ✓ |
| Page themes (5 built-in) | ✓ | ✓ |
| Resource resolver (custom) | ✓ | ✓ |
Math ($...$, $$...$$) | text fallback | ✓ real |
| Mermaid diagrams | fallback notice | ✓ SVG |
| Custom fonts | — | ✓ |