Writing an Async Runtime in Rust
michaelhelvey.dev·1d·
🦀PyO3
Preview
Report Post

If you’ve used Rust to build anything for the web (or anything that needs to talk to something else over a network), more than likely you’ve encountered async/await syntax. You’ve probably had to install an async runtime (more than likely tokio).

Most of the time, things like tokiodo a pretty good job of staying out of your way; you slap a [tokio::main] on top of your mainfunction, and use things like tokio::net::TcpListener instead of std::net::TcpListener, and magically your server can now handle thousands of concurrent TCP connections while using only a couple of threads.

But what’s really going on? The “async in depth” section of the tokiodocumentation does a good job of explaining the different async traits & helper s…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help