OhmJS
banner
ohmjs.org
OhmJS
@ohmjs.org
A user-friendly parsing toolkit for JavaScript and TypeScript ∙ https://ohmjs.org

Support Ohm development on GitHub Sponsors: https://github.com/sponsors/pdubroy
Published v17.3.0 yesterday, with a couple small improvements to the typings and a bug fix related to matching letters outside the BMP (basic multilingual plane): github.com/ohmjs/ohm/re...

Last release of 2025 (hopefully 🤞)…watch for a new major release early next year!
Release Ohm v17.3.0 · ohmjs/ohm
Browser bundles: ohm.js • ohm.min.js New features [d957ac7] typings: #494 - Typescript MatchResult object incomplete [e1b8225] typings: add FailedMatchResult / SucceededMatchResult [891b6d8] feat:...
github.com
December 21, 2025 at 7:19 PM
Just added an example to the Ohm repo of implementing something like Zed's SumTree.

(aka "monoid-cached trees" if you want to sound clever)

Full example here: github.com/ohmjs/ohm/bl...
December 10, 2025 at 3:59 PM
Reposted by OhmJS
What an amazing essay for everyone with the intention to design a programming language. Also mentioned: @ohmjs.org
November 13, 2025 at 9:46 PM
TIL about the CSS Custom Highlight API: developer.mozilla.org/en-US/docs/W...
Performant Syntax highlighting with CSS.highlights API and OhmJs

How to generate small & performant syntax highlighting for your languages using OhmJs and the new CSS.highlights API

www.youtube.com/watch?v=v3jK...

Repo: github.com/marianoguerr...

Demo: marianoguerra-atik.github.io/ohm-highlight/
Performant Syntax Highligting with CSS.highlights API and OhmJs
YouTube video by Mariano Guerra
www.youtube.com
November 14, 2025 at 3:11 PM
Reposted by OhmJS
📢 New #WasmAssembly podcast 🎙️ episode:
#WebAssembly from the Ground Up with @dubroy.com and @marianoguerra.org. Learn how they're teaching #Wasm by building a compiler in JavaScript and why writing Wasm by hand is crucial!

🍿 www.youtube.com/watch?v=dRdD...
🎧 wasmassembly.libsyn.com/webassembly-...
WebAssembly from the Ground Up with Patrick Dubroy and Mariano Guerra
YouTube video by Chrome for Developers
www.youtube.com
October 20, 2025 at 6:22 PM
Hey everyone, just FYI:

After investigating, we do *not* believe that ohm-js, or any other package under the @ ohmjs namespace, is affected by the Shai-Hulud worm or any of the recent npm supply chain attacks.
September 17, 2025 at 2:09 PM
Any Ohm fans who want to get a taste of low-level programming?

Get 25% off the only book in the world* that will teach you WebAssembly with Ohm!

(*So far.)
The summer holidays just started here in southern Germany.

So, it's time for a ☀️ SUMMER SALE ☀️ —

Use the code SUMMER25 for a 25% discount on the book until Sept 15: wasmgroundup.com
WebAssembly from the Ground Up
A book about WebAssembly — learn Wasm by building a simple compiler in JavaScript.
wasmgroundup.com
August 5, 2025 at 3:18 PM
First new release of Ohm in…eh *pulls at shirt collar* quite a while.

v17.2.1 is here…one small l'il feature and a teeny weeny fix: github.com/ohmjs/ohm/re...

Also pushed v2.0.1 of @ohm-js/cli.
Release Ohm v17.2.1 · ohmjs/ohm
Browser bundles: ohm.js • ohm.min.js New features: [456b540]: asIteration() is now support for iter nodes (returns the node itself) Fixes [59b17ec]: Expose Matcher’s grammar prop in TS types
github.com
July 28, 2025 at 2:50 PM
Reposted by OhmJS
Pretty pleased with the ergonomics of the Wasm (macro-)assembler in @ohmjs.org.

It's built on the low-level assembler lib we created for @wasmgroundup.com, but has some nice higher-level features, including labeled breaks. I'm particularly proud of the idea to put the block label at the end. 😊
July 25, 2025 at 8:00 AM
You know about the Ohm Discord, right?

Great place to ask questions, get feedback on your grammars, and hang out with the some of the friendliest folks out there.

discord.gg/KwxY5gegRQ
Join the Ohm Land Discord Server!
Check out the Ohm Land community on Discord - hang out with 169 other members and enjoy free voice and text chat.
discord.gg
July 17, 2025 at 2:09 PM
I'd also like to acknowledge the support from Adam Bouhenguel and Project Substrate (projectsubstrate.org), which provided the funding to build the initial MVP. 🙏

Without their support none of this would have been possible!
Project Overview
projectsubstrate.org
July 14, 2025 at 9:20 PM
We're still looking for more sponsors! If you or your company can help fund this effort: github.com/sponsors/pd...

Since 2017, my work on Ohm has been unpaid. Your sponsorship helps the project be sustainable, ensuring that I can maintain and improve Ohm for many years to come!
Sponsor @pdubroy on GitHub Sponsors
I'm the lead developer of Ohm (ohmjs.org), a user-friendly parsing toolkit for JavaScript and TypeScript. I also created the Ohm Editor, and the interactive visualization for understanding and ...
github.com
July 14, 2025 at 5:42 PM
Thanks to a generous contribution from Shopify, we've secured enough funding to make further progress towards production-ready Ohm+WebAssembly support! github.com/ohmjs/ohm/i...

Thank you Shopify for funding open source. ❤️
Production-ready WebAssembly support · Issue #511 · ohmjs/ohm
#503 covers the initial investigation into WebAssembly. Due to funding limitations, that work was scoped to a 6-week effort. This issue is about the next phase: productionizing the current prototyp...
github.com
July 14, 2025 at 5:42 PM
A few different Ink & Switch projects have used Ohm…here's the latest one.

From @alexwarth.bsky.social (co-creator of Ohm) and @geoffreylitt.com (who made Wildcard, one of our all-time favourite Ohm-powered projects)
What if a spreadsheet cell could hold multiple values at the same time?

That's the idea behind Ambsheets, a project I've been working on w/ @geoffreylitt.com at @inkandswitch.com. It's a new spreadsheet that makes it easier for you to explore many possibilities simultaneously.

1/2
July 10, 2025 at 6:12 PM
Outside of this specific funding need, if you get value from Ohm you should consider a recurring sponsorship: github.com/sponsors/pdu...

This keeps the project sustainable and ensures that I can continue to spend time maintaining and improving Ohm for everyone!
June 24, 2025 at 11:13 AM
We are seeking funding to make it possible to ship a production-ready version. (It's an estimated 8–10 more weeks of effort.)

If you or your company would benefit from the portability and performance improvements and could potentially help fund this work, please get in touch with @dubroy.com!
June 23, 2025 at 2:31 PM
Ever wanted to use Ohm from another language? Go, Python, Rust?

See the brand new, experimental support for compiling Ohm grammars to Wasm: github.com/ohmjs/ohm/d...

It wasn't the main goal, but it also appears to be a perf win — parsing is about 10x faster on real-world grammars (e.g. ES5).
June 23, 2025 at 2:26 PM
One of the biggest production users of Ohm that we know of is Shopify.

They used Ohm in the Liquid HTML parser that powers their prettier plugin & VS Code language server — as well as the Shopify Admin's CodeMirror-based editor.

www.npmjs.com/package/@sh...
npm: @shopify/liquid-html-parser
Liquid HTML parser by Shopify. Latest version: 2.8.2, last published: 2 months ago. Start using @shopify/liquid-html-parser in your project by running `npm i @shopify/liquid-html-parser`. There are 8 other projects in the npm registry using @shopify/liquid-html-parser.
www.npmjs.com
June 16, 2025 at 3:38 PM
Reposted by OhmJS
Working on a cheat sheet for @ohmjs.org grammars. wdyt?
May 17, 2025 at 2:16 PM
Making progress on the Wasm implementation — and encountering some interesting challenges!
Ok ok this may not make a lot of sense but I am *extremely* happy to have gotten this code working!! So I feel compelled to share.

(And yes, I wrote my own macro-assembler for #wasm in JavaScript. That's how much fun I'm having, and yes I mean that sincerely.)

1/x
May 16, 2025 at 2:58 PM
Reposted by OhmJS
Made some good progress on this! Follow along on the issue if you're interested: github.com/ohmjs/ohm/is...
May 2, 2025 at 3:22 PM
Hey folks, we had another Cloudflare ⇆ GitHub SSL issue which meant the web site was down for about an hour.

Thanks for @onlineornot.com we found out pretty quickly, and it should be fixed now!

And we'll be getting rid of Cloudflare so hopefully we'll be rid of this problem for good 🤞
April 29, 2025 at 7:08 PM
Reposted by OhmJS
Wondering if the book is *practical*?

I'm currently using the helper library extracted from the book for a new @ohmjs.org feature which will allow you to compile Ohm grammars to Wasm.

This will make it possible to use Ohm grammars from Go, Python, etc.

Details here 👉 github.com/ohmjs/ohm/is...
btw what I'm using here is the "assembler library" that we construct bit by bit in @wasmgroundup.com. It's also available as a standalone NPM package: www.npmjs.com/package/@was...

There's not yet much documentation (outside of the book), but we'll work on that soon!
April 29, 2025 at 7:01 PM
Excited to kick off some new Ohm work next week — adding the ability to compile an Ohm grammar to WebAssembly. See
github.com/ohmjs/ohm/i... if you're interested, and feel free to comment if you have opinions!
WebAssembly support · Issue #503 · ohmjs/ohm
Over the years we've had a few requests for a way to use Ohm from other languages — e.g. #348 mentions Dart, Rust, and Swift. Go and Python have also come up in private discussions. This propos...
github.com
April 25, 2025 at 3:00 PM