Version 1.13.0 of the Tokio platform has been released, designed for building high-performance applications in Rust based on event-driven architecture, supporting multi-threading and asynchronous network request handling. The project is written in Rust and is distributed under the MIT license. The new version highlights documentation expansion, several fixes in the networking subsystem, and synchronization systems.
Tokio includes the following components:
- A multi-threaded I/O scheduler that provides resources only to those threads (in the context of parallel execution) that meet specific conditions, helping to avoid race conditions often found in programs written in languages without safe memory and resource management.
- A backend to ensure compatibility with various operating system-provided connection multiplexing mechanisms, such as epoll, kqueue, and IOCP;
- Types and bindings with implementation of asynchronous TCP and UDP sockets.
- Tools for performing tasks asynchronously, including synchronization primitives, channels, and timeouts.
- An API for asynchronous I/O, covering TCP/UDP sockets, file operations, and facilities for signal and process management.
Developers highlight features of their product, such as high performance comparable to bare-metal speed, excellent scalability, and reliability provided by the type system and concurrency model of Rust.
The repository has over 500 contributors, including representatives from AWS, Azure, Comcast, Dropbox, and Facebook. For dependencies, Tokio uses products such as:
- hyper: a fast and secure implementation of HTTP/1 and HTTP/2 for Rust;
- warp: a lightweight framework for web servers, focused on high-speed performance;
- tracing: a framework for application-level tracing and diagnostics with consideration for asynchronicity;
- rdbc: a library for connecting MySQL, Postgres, and SQLite databases to Rust programming language products;
- bytes: utilities for working with bytes, including efficient byte buffers.
Source: opennet.ru
