Comrak
CommonMark and GitHub Flavored Markdown compatible parser and renderer written in Rust.
Comrak is a parser and renderer for CommonMark and GitHub Flavored Markdown, written in Rust. It runs as a command-line program that converts files to HTML, XML or CommonMark, and as a Rust library that parses a document into a tree, lets a program change the tree, and formats it again. A Rust project adds the library as a Cargo dependency.
None of Comrak’s own extensions, such as footnotes, math and alerts, are enabled until a parse turns them on. Other languages bind to the library, among them the Ruby gem Commonmarker. The project is developed by a community of contributors.
Worth knowing
Raw HTML and potentially dangerous links are removed by default. The unsafe option allows them, and the README recommends a sanitisation library configured for the application when that option is set.
The Disallowed Raw HTML extension, a GitHub Flavored Markdown feature, has been removed from Comrak, and the README says it should not be used.
Sources
- 2026-11-04: links, Written in, Runtime, Install with, License
comrak.ee/ - 2026-11-04: links, GitHub stars
api.github.com/repos/kivikakk/comrak - 2026-11-04: Maintainer
github.com/kivikakk/comrak/blob/v0.59.0/COPYING - 2026-11-04: Categories
github.com/kivikakk/comrak/blob/main/README.md - 2026-11-04: First release
api.github.com/repos/kivikakk/comrak/commits/0.1.0 - 2026-11-04: Current major version, Last release
api.github.com/repos/kivikakk/comrak/releases - 2026-11-04: Contributors
api.github.com/repos/kivikakk/comrak/contributors?per_page=1 - 2026-11-04: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/crates.io/packages/comrak