Tokio, Async Runtime crate for Rust

Tokio, async runtime for Rust

Adarsha Regmi
1 min readDec 15, 2023

A comprehensive framework for building high-performance, concurrent applications

At High level, there are three statements

A multi-threaded runtime for executing asynchronous code.

An asynchronous version of the standard library.

A large ecosystem of libraries.

Important Aspects

>> It is important to consider in networking the latency matters a lot and. only way to make the connections fast is the fact how many connections it takes at a time. And build upon async/await feature tokio is quite fast.

>> Many studies have shown merely about 70% of bugs are encountered because of memory unsafety and since tokio is build upon Rust it is reliable too.

>> Similarly, it is easier to use and flexible due to multi-threading, work-stealing runtime, single threaded runtime.

Not To Use Scenarios

>> Speeding up CPU bound operations by running in several threads. Use Rayon instead. See this example

>> Reading a lot of files

>> Sending a single web request.

--

--