The work I did there made me interested in pushing CommonMark adoption in general — pulldown-cmark is great (and fast!), but is currently lagging behind the spec. I did a more or less straight port of cmark-gfm from C to Rust, resulting in comrak. It’s available on crates.io now.
The relative advantages of comrak are that it’s based on a 1:1 translation of the reference cmark implementation, meaning upstream spec changes can be translated and adapted with relative ease — the parsing strategy is identical, so the risk of a spec change being difficult to adapt is extremely low. Further, it’s based on the exact code we run in production at GitHub, including the extensions to CommonMark (table/strikethrough/autolink/etc.), so it’s guaranteed to e.g. render your README.md the same way we do.
The relative _dis_advantage is that it’s a bit slower than the competition. Raph reported pulldown-cmark ran faster than cmark in this discussion — comrak runs at about
4.5x 1.9x the runtime of cmark. This still places it between discount and cmark itself in the cmark benchmarks.
This is my first piece of published Rust code, so I’m really interested in feedback on the API, improvements to the codebase itself, and so on. I’d like to drive CommonMark adoption in general, and I hope this is one way to contribute to that while also contributing to the Rust community.
Thanks for reading!