Skip to content
sebastian-softwarePublic

About

Fast Markdown-to-HTML engine in Rust with secure defaults, CommonMark and GFM support, plus Node.js bindings.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

9 stars

Watchers

0 watching

Forks

Latest commit

 

History

1,031 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Part of Ferramenta, a family of Rust tools.

Powered by Sebastian Software

Ferromark v3

Markdown at native speed.

Ferromark turns Markdown into HTML for documentation sites, publishing tools, and applications. A fast Rust engine with an arena-allocated document tree, CommonMark correctness, and practical publishing features. Ferromark Flavored Markdown adds opt-in syntax for richer documents. Use the Rust crate or its native Node.js bindings.

Documentation · Rust API · Node.js package

V3 is a breaking upgrade of the Rust API. Documents render as before unless you enable a new option. Read the changelog and the v3 upgrade notes; coming from v1, start with the v2 migration guide.

Why Ferromark

A Markdown engine earns its place when the documents get complicated. Nested lists. Reference links. Tables with real content. The page that looked fine until an author added one more footnote.

  • Keep the core focused. Parse Markdown and emit HTML or JSX. Your application chooses translation, site assembly, and the highlighter connected through rendering hooks.
  • Build correctness in. The explicit CommonMark profile agrees with all 652 specification examples. Differential checks against cmark and cmark-gfm expose edge cases and keep fixes reproducible.
  • Cover everyday publishing needs. Front matter, heading IDs, footnotes, callouts, and inline tables of contents support real documents. Table classes, captions, merged cells, and named columns give CSS control over layout.
  • Write richer Markdown. Ferromark Flavored Markdown adds image captions, quote attributions, attributes and inline spans, inserted text, and technical abbreviations. Each feature is opt-in, so unused syntax stays out of the way.
  • Keep rendering fast. Arena allocation, reusable buffers, specialized byte scans, and SIMD reduce parser and renderer work. You can inspect or transform the document tree before rendering it.

Ferromark leads every measured library in our 57-document comparison on Linux x86-64 and macOS arm64. CommonMark and GFM, plus opt-in publishing features for richer documents. Extra syntax adds parsing work.

Measured 2026-10-01, using the recorded profiles, fresh calls and all 57 frozen inputs, including different outputs. Node.js measurements include native binding overhead. Syntax and API contracts differ. Machines, versions, methods, and raw data.

Syntax and features, Ferromark Flavored Markdown, correctness and limits, and measured comparisons explain the details and trade-offs.

Quick start

Rust

cargo add ferromark
let html = ferromark::to_html("Hello, **world**!").unwrap();
assert_eq!(html, "<p>Hello, <strong>world</strong>!</p>\n");

Rust requires 1.95 or newer. The helpers return Result. Rust defaults preserve raw HTML; set HtmlRendererOptions::sanitize to true for untrusted input. The Rust guide covers configuration, ownership, and AST access through ferromark.

Node.js

npm install ferromark
import { toHtml } from 'ferromark'

const html = toHtml('Hello, **world**!')

Requires Node.js 22.12 or newer. Node defaults escape raw HTML and filter unsafe URL schemes. The Node.js guide covers metadata, Buffers, reusable renderers, and highlighters.

JSX and MDX

compileJsx(source, { format: "mdx" }) returns a JSX body and metadata. With output: "module" it returns a complete MDX module and source map instead. Your application compiles JSX and supplies components. Ferromark adds no React imports. JSX is a trusted program; HTML APIs keep their existing trust policies.

CodeCompiler reuses selected native plugins and prepared documents, with standalone code rendering. See the Node JSX guide and Rust renderer contract.

Syntax highlighting and Mermaid diagrams

Ferriki and Ferrigura use optional code-rendering hooks. The standard Node addon includes neither engine; custom bundles select either or both. The plugin API requires a source build or custom bundle.

Integration guide: Rust hooks, Node callbacks, native bundles, release availability, SVG safety, and diagnostics.

Document analysis

Rust and Node offer reference collection, text extraction, and static Markdown projection. Examples and release availability.

Make it yours

Contributing and license

See CONTRIBUTING.md for setup and required checks. The code is MIT licensed; source provenance preserves upstream attribution. Specification fixtures and benchmark corpora retain their separate licenses.

Ferramenta — A family of Rust tools.

Engines

Tool Job
ferroni Oniguruma-compatible regex engine
ferriki Shiki-compatible syntax highlighting
ferrolex Spell checking for text and code
ferrocat Translation catalog engine
ferralk Glob matching and parallel filesystem walking
ferrugo PDF previews for untrusted files

Applications

Tool Job
palamedes Internationalization for TypeScript applications
dalo Your team's agent setup, versioned like code

Sebastian Software
TypeScript, React & Rust consulting
Experts in Agentic Software Development
Work with us · More open source

Copyright © 2026 Sebastian Software GmbH

About

Fast Markdown-to-HTML engine in Rust with secure defaults, CommonMark and GFM support, plus Node.js bindings.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

9 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages