logoalt Hacker News

traderj0etoday at 4:06 PM2 repliesview on HN

The post doesn't hate on Rust, it's more saying you probably shouldn't use it for high-level code like a web backend. Which is pretty reasonable.


Replies

vablingstoday at 4:22 PM

I have been churning away writing a custom backed in rust using Dioxus, it is excellent for this kind of high level work.

tracker1today at 5:00 PM

Having written web backends for three decades in quite a few languages along the way, I disagree. You can definitely write some relatively simple backends in Rust. Tokio and Axum make it quite friendly, and depending on what you are connecting to it becomes super easy, barely and inconvenience.

Even if you cheat and do a lot of cloning across library boundaries, it's still likely to perform pretty well compared to a lot of prevailing frameworks. I'd say I'm most recently most familiar with C# and FastEndpoints as well as TS/JS and Hono, but I've used many others. I've also done a bit with Rust and Tokio/Axum and it's not been significantly worse than the former mentioned options. That said, the runtime containers are a fraction of the size, start significantly faster, and use a lot less memory with Rust. And once your boilerplate is in place (jwt/oauth, db context, etc), it's roughly the same work.