Re-writing Firn in rust (pt. 1)
I'm thinking about re-writing Firn in rust. I'm not sure if I will do it, but I've been thinking about some of the more fundamental design decisions that I want to consider when building software. Firn is built in Clojure, with a touch of Rust for the org-mode parser, and then is all compiled down to a binary using GraalVM's native-image tool. It's working, so why re-write it?
- The Graalvm system feels like a bit of a house of cards.
- Configuring it was a bit confusing, and there hasn't been much documented use yet in the community.
- Compilations times were pretty slow and were heavy on resource usage.
- Compiling for multiple platforms with GraalVm is possible but I'm not as confident using it; I imagine using rust would be a bit easier.
- It would be a good way to learn Rust, which I'd need to do anyway if I was going to make changes to the parser library Orgize.
- The parser is already written in rust - it would simplify development workflow and better enable external contributions.
- Smaller binary sizes (I imagine more compact binaries would be a result. This isn't important to anybody, but it seems to matter to me).
- Using a single language might simplify things, generally.
- Well, I already spent 250+ hours building firn, according to my time tracking. It was a great experience, but in a sense, I could keep refining what exists rather than do a re-write, which will definitely take time.
- Working in Clojure is much faster for me (I would also miss the REPL).
- It would take a while and I might get discouraged and give up.
- I would have to move my templating system from hiccup to ... whatever is available in Rust. This would also mean some major architecture changes - I can't simply follow the system I used with Clojure.
In the end, it sounds like I'm looking for a way to learn Rust, out of my own interest in it, and that's fine. I've got a few other projects on the go that will take precedence, but this has been coming to my mind lately as I've been reading The Rust Book. I'm not sure I have much use for Rust, generally, and I think I work better in interpreted / non-compiled languages but I'd like to round out my skills nonetheless.