Chisel ported to Rust
I write when I either have something to record or share. When I do, I quickly want to get something off my head and onto a note. Given the pace at which they come, I’m unlikely to write a thousand posts in my lifetime. And even if I eventually do, Chisel — my static site generator in python — is quite capable of generating them all in seconds. So I certainly have no need for another publishing tool.
But idle mind wanting distraction decided yesterday to port Chisel to Rust just to see if it could be done; and if successful, to see how fast. I dropped chisel.py, a bunch of templates, and a brief on what I wanted Claude to do. My instructions were to (a) use minijinja templating engine, (b) build some filters missing in minijinja (e.g., age, striptags, wordcount; include tojson from json), and also to render markdown between markdown and endmarkdown delimiters in templates (use my existing Jinja2 templates without modifying), (c) use borrow checker — Rust’s famous memory-safety feature, employ multicore and parallel processing using rayon.
The first run was already great; we missed the filters and picked up a few errors. By noon, I had a well-documented main.rs, and Cargo.toml.
I’ve been using Chisel (in python) for over 14 years (2012-26) now. I control the source; it has everything I want, and nothing I do not need. And it’s been absolutely reliable, predicable, rock solid. Before Chisel, I used
- Tumblr for <2 years (2010–12),
- WordPress for 6 years (2004–9),
- Greymatter for <1 year (2002),
- Blogger (on and off) for <2 years (2002–4),
- Geocities for <1 year (2001–2), and
- Homestead for <2 years (1999–2001)
Chisel ported to Rust is a rocket ship — 800× faster than its python-based sibling. The speed is already nuts, and I have since re-compiled for the native CPU with:
RUSTFLAGS="-C target-cpu=native" cargo build --release
It made me realise this would be the only publishing tool I will ever need in my lifetime, no matter how many thousand notes I may (or may not) write and publish. With this port flying, I will probably retire my trusty old friend. What a run it’s been.