Published June 26, 2025
A few days ago I asked if people would be interested in me sharing some recipes and mentioned Cooklang, a markup language for recipes. I spent some time looking at it and it’s really cool. The only problem? There is no parser written for it in Python. There is, however, one written in rust. Ordinarily a library written in rust wouldn’t be the most useful thing for me. That isn’t the case this time. The developers used UniFFI to create the necessary Python bindings. The only problem is that they didn’t take the next step of publishing the parser in Python. I’m guessing that’s pretty much because they’re not Python people.
But I am. I asked around and, after a lot of confusion between what I was asking and what was being heard, found that
there is something that looks to be a pretty simple solution; a Python build tool called
Maturin. From the documentation it looks like it should be as easy as adding
a pyproject.toml and using Maturin as the build backend. I haven’t had a chance to try this just yet, but I’m
optimistic it will work. With any luck there will be an official Cooklang parser for Python pretty soon.