Hacker News new | ask | show | jobs
by lenkite 38 days ago
> 3. You don't need to use async Rust.

This is like saying you don't need to use a Smartphone. Technically, correct, but then you need to live like a caveman.

1 comments

I do a lot of real-time audio programming in Rust because it is so expressive and the compiler so helpful

But I disagree. I do not use asyc/await for my asynchronous programming in Rust if I get the choice. I have used it extensively in other languages, and when I've had to in Rust, but there are many problems

The paradigm itself is not suited to hard real-time programming. An explicit event loop is unbeatable in that case

The model does not fit properly in the Rust memory model, and quite often you find yourself using pretzel logic and "magic incantations" to get around that

It is synchronous in style, and a footgun as CPU bound operations can block it.

The threading support in Rust is superb and for the vast majority of cases a perfect fit

Async/await in Rust is a very impressive technical achievement, I am very impressed by how much gets done so efficiently and how well the runtime perform