Meon - declarative parsing engine with no AST
โ Rust ๐ 2026-07-05 ๐ค surdeus ๐๏ธ 3meon โ declarative flat-parsing engine (SoA, no AST)
I started this as a simple Markdown parser. Then I got curious about making it faster, and that curiosity turned into a bigger architectural question: instead of building a tree/AST, what if the parser output flat arrays โ one Vec per element kind (headings, bold spans, links, etc.), all as zero-copy byte-offset spans into the source?
That idea grew into a small engine: you describe a grammar once via define_parser! and get a generated parser with no runtime dispatch. The Markdown parser became just one concrete grammar built on top of it. I later added a JSON grammar to prove the engine isn't Markdown-specific.
This project ended up as the basis of my coursework (3rd year, university), so it's had a fair amount of design iteration โ but it's also grown past a toy project, and I'd like a critical outside look before I consider it more "done."
Repo structure (workspace, 4 crates):
meonโ the core engine +define_parser!macro runtimemeon-macrosโ the proc-macro itselfmeon-mdโ Markdown grammar (reference implementation)meon-jsonโ JSON grammar (reference implementation, proves the engine generalizes)
Also included: criterion benchmarks (comparisons against pulldown-cmark/serde_json where relevant) and a cargo-fuzz harness.
1 post - 1 participant
๐ท๏ธ Rust_feed