Skip to content

Rust Markdown Engine

Markdown to HTML at 280 MiB/s

ferromark is a streaming parser focused on one job: turning Markdown into HTML faster than pulldown-cmark, md4c, and comrak while staying fully CommonMark compliant.

652/652CommonMark tests passed
15Rendering controls for precise output
90%+Real-world MDX patterns covered

Proof

Benchmark numbers you can verify

Apple Silicon (M-series), July 2026. Non-PGO binaries. Same GFM settings for all parsers.

ParserThroughputvs ferromark
ferromark280.5 MiB/sbaseline
pulldown-cmark275.2 MiB/s0.98x
md4c (C)253.3 MiB/s0.90x
comrak71.8 MiB/s0.26x

Feature Surface

Everything needed for modern docs pipelines

CommonMark + GFM

  • 652/652 CommonMark spec tests pass
  • Tables, strikethrough, task lists
  • Autolink literals + disallowed raw HTML

Beyond GFM

  • Footnotes and front matter extraction
  • GitHub-compatible heading IDs
  • Math spans ($ / $$) and callouts
  • Highlight, superscript, subscript

MDX Workflow

  • Render full MDX without JS toolchain
  • Export ready-to-use JSX component modules
  • Segment-level control for custom pipelines

MDX Included

Use MDX without a JavaScript parsing toolchain

Opt into the mdx feature and choose your control level from high-level render output down to per-segment handling.

render()

One call for HTML body, extracted ESM imports, and front matter metadata.

View code path

to_component()

Generate production-ready JSX/TSX modules for React, Preact, Solid, and more.

View code path

segment()

Inspect and route each MDX block when you need low-level pipeline control.

View code path
let mut buffer = Vec::new();
ferromark::to_html_into("# Reuse me", &mut buffer);
// reuse buffer across calls to avoid repeated allocation

Trade-offs

Deliberately optimized for throughput

  • No AST traversal API
  • No source map position tracking
  • HTML output focus only

Ship faster Markdown pipelines with less overhead

Start with quick docs, inspect the benchmark setup, then plug ferromark into your production workload.