Experience building a web app with Rust
Late 2022/early 2023 I spent some time building a web application using Rust and Typescript. Somethings I would do differently, but the libraries worked well.
I used:
- Axum for the web framework, essentially serving up HTML and other media, handling authentication, and dishing out lumps of JSON. Recommended.
- For HTML templating, I used Askama. It works, has good documentation. I might look for something else as I miss transforms and css selectors from Lift.
- SQLx for database operations and migrations. Recommended.
- amqprs for working with RabbitMQ. Felt like I had to work quite hard to make it reliable on reconnections, and I’d likely now check again to see what else is out there, but we got there with this crate in the end. Partial recommendation?
On the front-end:
- Tailwind CSS. Looks great, but I’m not going there again. I’m more a semantic UI or plain CSS sort of person.
- Hand-written Typescript with web components. Works very well, and I appreciated not having to battle a large framework or build system. Recommended.
If I did this again? I’d take a look at htmx.