Yep. Where I notice it the most is frontend stuff. We’ve been using a WebAssembly framework, particularly Leptos, where you get to write HTML+CSS+Rust.
And normally, a colleague and I despise frontend, i.e. JavaScript. Like, it’s kind of cool, because you get a visual result, but the crimes against humanity you have to commit in terms of code readability were very visible to us.
And yeah, Leptos and Rust are a lot better in that regard, which boosts productivity. Particularly when a backend request fails, you get a Result
, which you can pass as one value to the display code and just display either the data or an error. That’s huge, because you make a lot of backend requests.
One downside in productivity and fun is that there obviously aren’t yet as many component libraries, so if you want a toast notification, you might need to implement that yourself.
But still, we almost had to seriously ask that colleague to pause dishing out frontend features, because he was enjoying it so much.
testcontainers is a cool crate. It basically allows you to launch a container to test against in your unit tests.
My use-case was when integrating Postgres+Diesel for persisting our data.
I really wanted to make sure that we can save our data into there and load it back out in identical form.
And yeah, rather than writing some elaborate scripts to do a full-blown integration test, it’s three lines of code with this crate to launch a Postgres container and have it cleaned up after the test.
Diesel is also quite cool here when you’ve got your migrations embedded, as it will automatically set up your database schema in the blank Postgres.