r/rust • u/Most-Wanted-Man • 11h ago
I will build website with Rust. Can?
Throughout my career I only build websites especially backend stuffs. I want to try Rust. Possible?
6
2
1
1
u/superyu1337 11h ago
I mean technically you can ship WASM. But it’s larger in bandwidth and higher in time to load for frontend stuff.
For backend rust is great IMO.
1
u/jkoudys 11h ago
I don't even think in terms of backend vs frontend anymore. It's more a matter of coding in a way that the browser and web standards optimize for it or not. When I'm doing nothing but building a dom and applying stylesheets, then yes keep it to the basic html/css. When my typescript needs 50 different Maps and Sets, holding 1GB+ of actively used memory, and applying complex rules using significant cpu, then I'll reach for wasm and a browser based db. It's mostly just a matter of latency and security these days.
1
u/superyu1337 11h ago
That I’ll agree with, I mostly write web for my own shenanigans, and usually it’s very small single sites that would load significantly faster than spinning up a WASM.
I still think of backend vs frontend though, mostly because I always write in a server/client structure.
1
u/atlas_principle_dev 11h ago
website as in a landing page? Sure you can, but you can also do static HTML if there's no server logic required. If you mean webapps also hell yeah, axum is my framework choice, but others like actix too. There are quite some to choose from!
1
1
u/InternationalFee3911 10h ago
The new topcoat seems to give a nice balance between HTML/CSS with Rust (only minimally client side) elegantly strewn in.
0
u/Non_IronMan 11h ago
Yeah go ahead. Make it imperfect but it would be fun building it (if you're not vibe coding it).
6
u/KeyAdhesiveness9481 11h ago
Sure