5 ms·
Nope, as far as I know there's no serverside HTML generation crate. Granted, I haven't looked, but I feel like it would have come up on /r/Rust sometime. Ever
by mcronce 4y ago
Nope, as far as I know there's no serverside HTML generation crate. Granted, I haven't looked, but I feel like it would have come up on /r/Rust sometime.
Everything else you mentioned is out there, although I didn't love the websocket experience the one time I needed them for something.
- steveklabnik 4y agoMost rust web frameworks are server side, and generate HTML, so I’m not sure what you were looking at, but it absolutely exists. Most rust web stuff is server side generated.
- mcronce 4y agoSure, obviously you can generate strings containing HTML and send those. I'm imagining something like the serverside rendering you get with e.g. React. That said, I don't know what specifically the previous poster was looking for.
- steveklabnik 4y agoI'm a bit confused, what's the difference? SSR React also ends up "generating strings containing HTML and sending those."
- Winsaucerer 4y agoI don't really know what you mean by serverside HTML generation crate. HTML is just HTML. What I usually need is some templating system, and that can be used to produce HTML, SQL, or whatever else I want. Use askama or tera, for example. Here's an example of using askama with axum: https://github.com/djc/askama/tree/main/askama_axum https://github.com/djc/askama/tree/main/askama_axum If you mean something more significant, like what an ORM/query builder is to SQL, then I haven't really had a need for such a thing myself. It's far more likely to get in my way when I stray past common scenarios.