I wrote an app to track my finances (accounts, assets, etc.) several years ago. I originally called it bonum, built with Java & Spring Boot and SQLite. I later migrated it to Kotlin & Spring Boot & Postgres. When the Rise of the Machines happenned, I revised some DB schemas, improved performance, and added a few features here and there.
Following my post on why Go is a good language for coding agents, I decided to try a project in Rust. It was my first time using it, and I wanted to test my own claims. So, I asked Fable 5.2 to create the plan, and I left the entire implementation to Opus 5.5.
I was surprised by the result after 4 or 5 sessions: stable software, extremely fast (not that Go is not), and the LLM iterated quite quickly, although, from my experience, it takes longer to converge than with Go.
The app is now called Paraige (bonum was already taken; actually, it’s NP-hard to find an unused name). It is free and open source, a native desktop app in Rust (v 1.100.1) using GPUI (the GPU-rendered framework from Zed), with no server, and featuring a local SQLite database that can be encrypted.
How I Did It
I didn’t just ask to rewrite this in Rust; that might work in 5 years (see Software literacy will matter even more), but not yet today.
The plan consists of a folder with 32 Markdown files, one per screen or module (project bootstrap, domain/core, database, CSV import, categorization, loans, MCP, encryption, …), each with its dependencies, estimated size, and a validation checklist.
An INDEX.md served as the entry point and imposed the same protocol for each session: read the index, the architecture, and the next file; implement; then run cargo fmt, clippy -D warnings, run the tests, and launch the app in both light and dark themes.
Not knowing Rust well beyond the basics, I imposed a constraint from the start: write Rust somewhat like typed Go.
- structs, functions, modules;
- structs own their data => no lifetimes (
'a) in a struct; - borrowed parameters, owned returns =>
fn f(snapshot: &Snapshot, name: &str) -> Vec<Row>; - need a value in two places =>
.clone()orArc<T>, initially, to be revisited if performance is poor; - if the borrow checker is unhappy => restructure (calculate first, mutate later), do not add lifetimes;
- introduce a
traitonly if there are at least two real implementations and amatchis not sufficient.
This was a chance also to learn Rust myself by reading the code (I will do this at my own pace on the core parts, which will likely take time given the amount of code written) and to keep it readable for someone coming from Go or Kotlin. In the end, I think the agent rarely got lost in useless abstractions. Well I don’t know for sure since I haven’t read everything, but I hope so 😇!
Some Numbers
Everything was done in 4 or 5 sessions. I retrieved our exchanges:
| Type | Count |
|---|---|
| Messages from me | 141 |
| Model calls | 2,540 |
| Tokens generated | 3.36M |
| Tokens read from cache | 1,081M |
| Tokens written to cache | 10.9M |
| Agent active time | ~17 h |
The billion tokens sounds a bit scary, but it is (I think) almost entirely cache, since the model reads the entire conversation (the files, the code, cargo outputs). According to my script, the tokens actually produced were around 3.4 million.
On the code side, today:
| bonum (Kotlin) | Paraige (Rust) | |
|---|---|---|
| Code | 13,100 lines of Kotlin + 9,800 lines of HTML templates + 1,000 lines of SQL | 53,100 lines of Rust (183 files) |
| Tests | 119 | 355 |
| Dependencies | Spring Boot, Postgres, a JVM and 175 Maven dependencies | 895 crates in Cargo.lock 😅 |
| Distribution | A server to launch + Postgres (in Docker) | Two executables and one .sqlite file |
So the Rust project is twice as large but it does more. The UI is better, I added MCP, database encryption (which I didn’t have in my Kotlin project), OFX/QIF import (which I also didn’t have), a different (and better working) X-year projection system than the one I had, proper multi-currency support, and themes. The ratio is probably closer to x1.8 at feature parity, but Kotlin is quite expressive, so it doesn’t surprise me.
I Dropped Postgres for Simplicity
I didn’t switch to Postgres for the love of it, but for materialized views. In bonum, I had several that I refreshed every hour via @Scheduled (REFRESH MATERIALIZED VIEW CONCURRENTLY), plus a dozen regular views.
I had to reconstruct the value of each asset day by day over years (filling in values for days without quotes), and do it in SQL on every display. It was too slow. With about 7,000 transactions, the accounts chart took 1 second to display, and an asset detail page took 2 seconds. It’s not huge, but enough to annoy me.
Paraige takes the problem the other way around. After discussing with Fable why I had switched to Postgres, and with the goal of a rewrite in Rust or Go, it wrote me small programs in Rust+Postgres, Rust+SQLite, and Rust+SQLite+In-Memory to explain why I was wrong, and that the third solution was the right one for my project.
I think it was the right choice, because performance is much better, and it solves my major problem for distributing the app: people don’t want to install a JVM + Docker or Postgres and configure all that. SQLite is a single file and that’s it, that is the source of truth. On startup, everything is loaded into an immutable in-memory Snapshot, and each screen is calculated by pure functions. After a transaction write (manual or file import), the snapshot is reloaded. It is simpler, and fast enough.
The measurements that justified this choice (Mac Mini M4 Pro, based on one million transactions over 20 years, with 500 assets, and 3 million daily quotes):
| Calculation | SQLite only | Rust in-memory |
|---|---|---|
| Month × category totals over 20 years | 428 ms | 1.3 ms |
| Daily asset valuation (my old materialized view) | 3.4 s | 4.5 ms |
| Daily balances for all accounts | 52 to 207 ms | 0.8 ms |
| Loading one million transactions into memory | — | 127 ms, 123 MB |
With my real data (about 7,000 transactions), the snapshot loads in 4 ms. It’s not Rust that makes the materialized view useless, it’s in-memory calculation. The JVM or Go could have done the same; I just hadn’t thought to take this approach, and Fable pointed me in this direction.
Did the Agent Struggle with Rust?
I counted in the transcripts, and during the rewrite, Opus ran cargo (build, clippy, test) about 430 times, and about one time in five it failed:
| Error | Count | What it is |
|---|---|---|
E0599 |
43 | Non-existent method => mostly the GPUI API |
E0502 / E0499 |
21 + 5 | The borrow checker |
E0277 |
19 | Trait not implemented |
E0433 / E0425 |
13 + 13 | Path or name not found |
So the borrow checker was not the only thing that slowed the agent down, perhaps because I asked it to write Rust like typed Go. What also slowed it down was dealing with the GPUI API, which doesn’t seem stabilized yet (it decided to pin an exact version, I didn’t ask why). It also used the gpui-kit plugin for Claude Code (skills with the API and components), which probably helped.
My Experience Compared to Go
I could have had this app rewritten in Go, and I think I would have gained:
- build time, by a long shot (see below);
- faster convergence on business logic, there are fewer concepts and fewer back-and-forths with the compiler, and I already have some really nice SKILLS with linter, go-quality, etc.;
- a build folder of a more reasonable size.
But I would have lost on UI because, to my knowledge, there is no GPUI in Go with this kind of performance and such a rich component library (Sankey, themes), so I would have had to rewrite all of that. Or I would have gone with Wails like for reliure but it would be a webview + HTML/JS.
Regarding cross-compilation, it works very well in Go, but probably with encrypted SQLite and a graphics toolkit, I would have needed cgo.
I don’t think the performance of my Rust version is light years ahead of what would have been produced in Go, and if my transaction corpus loaded in 6ms instead of 4ms, it wouldn’t have been a problem.
My opinion is therefore: for an API, a CLI, or a backend, I would stick with Go for now. For a fast, native desktop app, Rust + GPUI is (I think) a better choice (should I burn tokens to rewrite Reliure 😄), and the agent compensates, I was going to say generously but it’s in reality entirely because I don’t know the language.
In exchange, I knew exactly what I wanted and how, and I have enough software literacy to go in the right direction (at least acceptable) right away, but you learn everyday.
Last Point, on Build Time
However, for me who loves Go’s fast compilation, it’s a different story in Rust. Still on my Mac Mini M4 Pro:
| Duration | |
|---|---|
| Nothing to recompile | 0.4 s |
| Change in app + debug build | 1.6 s |
Change in domain (core) + debug build |
2.3 s |
| Incremental release build | 1 min 12 s |
| Cold full release build (app + MCP server) | 2 min 21 s |
| Cold full debug build | 2 min |
Incrementally, it’s still okay, the loop with the agent is fine. But the release build is long, and a cold build is almost a coffee break (at work, my Java Maven project takes 11 min to build on Jenkins, so there’s margin). I think roughly, a Go project of this size would compile in a few seconds incrementally and in well under a minute cold, even with cgo.
And for nodejs regulars, the target/ folder weighs 51 GB:
| Folder | Size |
|---|---|
target/debug |
39 GB |
target/x86_64-unknown-linux-gnu (Linux build) |
7.8 GB |
target/release |
2.6 GB |
target/x86_64-pc-windows-gnu (Windows build) |
1.6 GB |
Apparently 895 crates compiled for all profiles (debug, release, etc.) and all platforms weigh super heavy. Inside, there are also incremental compilation caches accumulated over hundreds of builds.
After a cargo clean, I measured a cold debug and release build; it still takes 5.5 GB (3.6 GB in debug, 1.8 GB in release). Good to know.
Conclusion
Four days to replace a Kotlin + Postgres web app that I spent a year writing in my free time before the rise of the machines, with a native desktop app, much faster, more beautiful, much less of a headache to maintain, easy to distribute, with a few extra features, many more tests, fewer bugs, and in a language I don’t know how to write. Who would have believed it if it had been announced in 2020.
What I take away:
- the plan matters more than the model: even if I think I did well by burning my tokens with Fable 5.2 to discuss and arrive at a complete, fine-tuned plan with validation criteria (totals identical to the Kotlin version, which was battle-tested on this point). Would Sonnet be enough for the implementation? I chose Opus anyway;
- constrain the language: Asking for Rust like typed Go, I think, prevented the borrow checker from becoming a problem for me. Maybe now a second session to make the code more Rusty would be a good thing; in total truth, I don’t know at all;
- it converges slower than Go: due to Rust or to GPUI? But that’s what I suspected in why Go is a good language for agents;
- Go remains my default choice for now for CLI / API / native apps without UI, if only for build time and the dozens of Go 😅.
Until next time !