You can learn to use Rust in Go-like settings in under a week.
You can have your first Actix[1]/Sqlx website up in a day, and you can have it doing some non-trivial work -- including sharing state between threads -- by Friday if you start today.
Rust's type system alone is a compelling enough reason to try this. Cargo a close second.
I'm willing to bet a lot of people start using Rust for backend web development. It's quite pleasant.
> I'm willing to bet a lot of people start using Rust for backend web development.
It will happen, but it's not something you should do today. The async ecosystem in Rust is not yet ready for prime time, there are key language and stdlib features that are just missing. And this in turn holds the web ecosystem back. If you write a web backend in Rust today, you might just do a lot of pointless work that you'll have to rewrite in the future anyway as more advanced frameworks come along and the earlier ones are practically abandoned.
My company runs everything on AWS lambda, I’ve worked on Lambda with Go, Python and Typescript before this, Rust is by far the best experience I’ve had. Async works great, it’s definitely a lot harder to figure out the ecosystem than something like Go, but there’s nothing missing that I know of?
I save a lot of time with those two decisions. My lambdas are significantly less likely to have runtime errors. And with containers I can select which version to run from my registry
What are you talking about? Async is marvelous in its current state. It's not changing much at all.
I had to port async runtime APIs many moons ago and it was an easy migration. Now things are baked in and I haven't had to change anything for years.
> there are key language and stdlib features that are just missing.
Like what?
> If you write a web backend in Rust today, you might just do a lot of pointless work that you'll have to rewrite in the future anyway as more advanced frameworks come along and the earlier ones are practically abandoned.
1. If you write atop Tokio, you're fine. (You wouldn't pick anything else unless you have special case needs for your app.)
2. If you write atop Actix/Axum(Tokio), you're doubly fine -- they're abstracting away everything.
Take a look at https://rust-lang.github.io/wg-async/vision.html for the shiny things that are planned in future versions of Rust. This will most likely require brand-new frameworks and create a whole lot of pointless churn for pre-existing code.
> This will most likely require brand-new frameworks and create a whole lot of pointless churn for pre-existing code.
I doubt it. I suspect existing code will continue to work with minor mechanical changes, and the improvements will just open up new use cases that are either impossible or awkward to do today.
In the list of projects I don't see many that would actually materially change frameworks, beyond changes from -> Box<dyn Future> to -> impl Future or reduced boilerplate due to more concise syntax sugar.
I wish there were equivalent books to Zero 2 Production for other ecosystems. I'm working on a project with Sveltekit project right now, and a major frustration for me is the proliferation of choices that come from working in the TS/JS ecosystem. While those choices exist in Rust too, the Zero 2 Prod book at least presents a pathway where reasonable defaults are presented for everything from tracing to ORM and I don't have to review a million and one different options and figure out how to make them work. JS build systems are nightmarish to me and Python is only slightly less bad.
Edit to add: if there are recommendations for TS/JS front-end development, I'd love to see them.
I started with exercism for rust, and then Zero2Prod.
Through Zero2Prod, it's very nice to see how easy the rust ecosystem makes it to do "high level" web programming with minimal friction. The type system makes Domain modeling fantastic. Options and Results feels like the right way to do error handling, and the `?` operator cleans things up nicely.
I only wish that rust was something I could use at work (we're mainly a Go shop; not my favorite), but I suppose I'll have to wait for the right opportunity.
Not so much. You cannot learn Rust to any useful degree in under a week, period. It's worth learning, but it's not that easy.
Async makes it even harder, yeah.
Though a lot of what I'd use async for in Python, I'll use Rayon for in Rust, and it's... fine, really. Better than fine even; it's easy to avoid concurrency issues that way.
> Not so much. You cannot learn Rust to any useful degree in under a week, period. It's worth learning, but it's not that easy.
Let's pick a competent engineer with zero Rust experience and teach them. I wager you $1,000 that they can write a TODO app in Rust/Actix without looking at a direct example.
I'll even up the wager and concede that they must have zero C/C++ experience. Only garbage collected languages under their belt.
I'm being a bit facetious here as I don't have the time to babysit this wager given my startup, but I really want to make this bet and I'm very comfortable in thinking that I would win it. (Maybe if I offer $1000 to the engineer too as incentive to try - that could work.)
You can have your first Actix[1]/Sqlx website up in a day, and you can have it doing some non-trivial work -- including sharing state between threads -- by Friday if you start today.
Rust's type system alone is a compelling enough reason to try this. Cargo a close second.
I'm willing to bet a lot of people start using Rust for backend web development. It's quite pleasant.
[1] Or Axum