pulldown-cmark

A fast, safe pull parser for CommonMark Markdown written in pure Rust

Library
Cargo
v0.13.4
2,729 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
84 /100 Excellent
Development Activity 96
Maintenance 72
Community 68
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
85 /100 Excellent
Architecture 90
Code Quality 88
Innovation 85
Learning Curve 78

pulldown-cmark is a pull-based CommonMark parser for Rust that turns Markdown source into an iterator of events rather than a fully materialized document tree. That design keeps memory allocation to a minimum, since most text is emitted as zero-copy slices of the original source, and it lets callers transform or filter the parse stream with ordinary iterator combinators like map and filter. It targets 100% compliance with the CommonMark spec while optionally supporting GitHub-flavored extensions such as tables, task lists, footnotes, and strikethrough.

What You Get

  • A pull-style Parser implementing Rust’s Iterator trait over Event values for start/end tags, text, breaks, and inline content
  • A built-in HTML renderer (html::push_html) for converting the event stream directly into an HTML string buffer
  • Optional CommonMark extensions: tables, task lists, footnotes, strikethrough, smart punctuation, and ==highlight== marks
  • Source-map support via into_offset_iter(), yielding (Event, Range) pairs that map each event back to its byte offset in the source
  • A no_std-compatible build (via --no-default-features plus hashbrown) for use in constrained environments
  • A bundled CLI binary for quick Markdown-to-HTML rendering from the command line

Common Use Cases

  • Rendering Markdown documentation, README files, or CMS content to HTML at build time or request time
  • Building custom Markdown transformations (e.g. soft-break-to-hard-break conversion, link rewriting) by mapping over the event iterator
  • Powering static site generators and documentation tools (it is the parser behind mdBook and other Rust doc tooling) where source-map fidelity and performance matter
  • Extracting structured data from Markdown (headings, links, code blocks) by consuming the event stream without building a full AST

Under The Hood

Architecture — The parser runs a first pass (firstpass.rs) that scans the source for block-level structure and builds a tree of block spans (tree.rs), followed by an inline pass (parse.rs) that resolves emphasis, links, and other span-level constructs against that tree; lib.rs exposes the resulting Parser as a Rust Iterator<Item = Event>, and html.rs is a separate consumer that walks the same event stream to emit HTML, keeping parsing and rendering strictly decoupled. Tech Stack — Pure Rust (98.5% of the codebase) with zero required dependencies for the core parser; entities.rs and puncttable.rs are large generated lookup tables for HTML entity decoding and Unicode punctuation classification, and an optional simd feature enables SIMD-accelerated scanning on x86-64. Code Quality — The workspace includes a dedicated tests/ directory plus specs/ containing the CommonMark spec test suite, a fuzz/ and dos-fuzzer/ crate for fuzz-testing parser robustness (guarding against pathological/adversarial input), and CI-run bench/ benchmarks; the crate compiles under #![no_std]-friendly configurations, evidence of disciplined dependency and API-surface hygiene. API Design — The Iterator-based Event API is idiomatic Rust, requires only 3-4 lines to go from Markdown string to HTML output, and cleanly separates parsing from rendering so consumers can filter, map, or collect the event stream before it ever touches HTML — a deliberate improvement over push-parser designs common in other Markdown libraries.

Used by 7 apps in this directory

TypeScript
54%
MIT

Anarlog

AI Assistants · Note Taking · Productivity

9,404

Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.

View details
86
Repo Health
77
Technical
68
Dependency
Built with
TypeScript 54%
Rust 34%
Updated 4 days ago
Rust
95%
MIT

claw-code

AI Agents · AI Code Assistants

195,291

A Rust-built CLI agent harness for Claude AI with persistent sessions, MCP tool integration, plugin hooks, and multi-provider support — designed to run autonomous coding workflows without human babysitting.

View details
51
Repo Health
71
Technical
77
Dependency
Built with
Rust 95%
Updated 1 months ago
Rust
52%
Apache 2.0

cocoindex

AI Development · Data Engineering

11,607

An incremental data indexing engine that keeps AI agent context perpetually fresh by reprocessing only what changed.

View details
87
Repo Health
85
Technical
65
Dependency
Built with
Rust 52%
Python 48%
Updated 4 days ago
Rust
99%
Other

Fluree DB

Databases

469

A temporal, verifiable graph database with git-like branching, integrated vector/text/geo search, and RDF/SPARQL/JSON-LD/openCypher support — benchmarked at 10.4x faster than the next database on the full Wikidata dump.

View details
87
Repo Health
74
Technical
65
Dependency
Built with
Rust 99%
Updated 5 days ago
Rust
88%
GPL 2.0

Fresh

Code Editors · Developer Tools

9,052

A zero-configuration terminal text editor with familiar keybindings, full mouse support, LSP-powered IDE features, and a built-in orchestrator for running multiple coding agents in parallel worktrees.

View details
86
Repo Health
88
Technical
71
Dependency
Built with
Rust 88%
Updated 5 days ago
Rust
47%
MIT

Kuku

Note Taking

225

A local-first, open-source Markdown knowledge workspace for macOS — plain files, personal wiki and Second Brain workflows, AI-assisted diffs, and encrypted sync, built as an Obsidian alternative.

View details
52
Repo Health
67
Technical
67
Dependency
Built with
Rust 47%
TypeScript 40%
Updated 3 weeks ago
Rust
64%
Apache 2.0

Temps

Analytics · Devops · Monitoring

801

A self-hosted Rust PaaS that replaces Vercel, Sentry, PostHog, Pingdom, Resend, and E2B with one binary — plus 440+ CLI operations agents like Claude Code can drive directly.

View details
81
Repo Health
86
Technical
70
Dependency
Built with
Rust 64%
TypeScript 34%
Updated 4 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers