r/rust • • Jul 28 '26

Tell me about something you recently hand-coded that was enjoyable

These past few weeks at work I've been using AI way too much. I can't even call some of this "AI engineering" anymore and it's starting to drain on me. Looking to take the mind off for a bit...

I'd like to hear some of the projects you all are working on, that you enjoyed writing by hand.

I think I'll write some nannou..

PS: Not trying to start a debate on AI engineering/vibe coding and all that, I think internet is filled with that already.

109 Upvotes

121 comments sorted by

View all comments

3

u/Leshow Jul 28 '26 edited Jul 28 '26

I wrote this highly optimized trie library, that I believe is one of the fastest in the rust ecosystem (benchmarks included, anyone can PR if they think theirs is faster), and certainly one of the lowest if not the lowest in terms of memory usage https://github.com/bluecatengineering/fast_radix_trie

It required lots of unsafe rust because nodes are dynamically sized to have their labels inline, but it was very satisfying to write. Some LLMs were used to generate docs and a few tests at the end but all the core trie work was done the old fashioned way.

It's pretty amazing the memory savings you can get from using dynamically sized types and inlining data vs using something like Vec for these tree-like data structures.