News for hackers. Stuff that matters.
Re:Htmx 2.0.0 has been released by fprotthetarball on Monday June 17, 2024 @06:38PM (#40711966)
My backend for a simple web application I'm working on is entirely in Rust. Highlights:

- axum: web application framework - https://github.com/tokio-rs/axum

- axum-htmx: axum extractors, responders, guards for htmx - https://github.com/robertwayne/axum-htmx

- rusqlite: SQLite bindings - https://github.com/rusqlite/rusqlite

- maud: HTML templating as a macro - https://maud.lambda.xyz

The way maud lets you compose markup works very nicely with htmx. The HX-Request header lets you know if the request is coming from htmx or if it is a regular request. You either call the top-level function if it's a regular request to get the entire page rendered, or call a subset of functions to get the appropriate partial rendered if it's an htmx request.

It's also nice to easily have tests for the rendered pages. My unit tests cover verification of the rendered HTML, too.

Re:Htmx 2.0.0 has been released by brunoqc on Monday June 17, 2024 @11:12PM (#40713740)
Do you use something like cargo-watch for "hot reload"?
Re:Htmx 2.0.0 has been released by fprotthetarball on Tuesday June 18, 2024 @05:35PM (#40722375)
No, I just stop and restart when I feel like I'm in a good spot. Nothing fancy.