I've seen someone rewrite a wireguard proxy in rust for performance without realizing that it's just a daemon that interacts with the kernel to setup routing... But hey, at least the key generation is faster!
To be fair, big refactors like this need to be done gradually. This is obviously the first step.
Next step can be to port it using e.g. tractor tooling and have a bunch of unsafe calls you need to implement. It's a really fun puzzle. The goal is to have no more cpp dependency
Honestly there should be a filter for these types of articles. I’m not going to bother reading something another person did not even bother writing.
memory usage dropped to half, execution speed is now 2x. Cross deployment is easy from silicon man to x64.
There are many low level optimizations available which i can exploit, compile is super fast for my project so development experience is better.
LOC dropped to half of the original.
Rust made life so much easier :)
2. Ignore any technical tradeoffs and considerations but solely lean on your guts and hypes on the Internet.
3. Ask Claude to rewrite the entire codebase to rust. Boom! Now you’re allowed to show off yourself on LinkedIn and HW as a super great rust engineer.
Step 2. Rewrite only the wrapper using already written tests.
Step 3. Get internet points because an LLM Rewrote it in Rust!
Next step can be to port it using e.g. tractor tooling and have a bunch of unsafe calls you need to implement. It's a really fun puzzle. The goal is to have no more cpp dependency