https://github.com/jeff-davis/postgres-extension.rs
See my example where a pure-rust postgres extension can start a background worker, listen on a port, and handle concurrent network requests, multiplexing them over a single backend calling a non-thread-safe internal postgres API.
That's possible because rust has no runtime to get in the way, it can use C structs natively and seamlessly, tokio offers the CurrentThread runtime (which doesn't spawn new threads), and a bunch of other details that need to be done right.
Try doing that in a pure-Go postgres extension.
Go and Rust are completely different in many ways. It's kinda like you're asking why someone would want a hybrid minivan when they've been making hybrid sedans for over 10 years.
Go's is a little different. I can't run Go on something with 2k of RAM like an Arduino, but Rust's async structure is actually extra helpful there.
Can Rust's async even work on an Arduino or any bare-metal system?
Re:Async-await on stable Rust
by steveklabnik on Thursday November 07, 2019 @06:58PM
(#21478753)
Yes. Right now the implementation requires TLS but that will be going away.
To whoever downvoted Steve, he's talking about thread local storage, not transport level security.
Re:Async-await on stable Rust
by steveklabnik on Friday November 08, 2019 @10:52AM
(#21483336)
Thanks for the clarification! I didn't even notice I was downvoted, and now you're downvoted... I don't get it.
a bit too excited. GP isn't wrong, Go pretty much has the same thing and I have never seen so much fanboyism for a single feature ever in my career.
I don't get it, but that might be because I am a manager.