A pure Rust Modbus library built on tokio for asynchronous and synchronous industrial communication.
tokio-modbus is a Rust library that implements the Modbus protocol for industrial communication systems. It enables devices to exchange data over TCP or RTU networks, solving the need for reliable, standardized communication in automation and IoT applications. The library provides both client and server implementations with support for asynchronous and synchronous operations.
Rust developers working on industrial automation, IoT, embedded systems, or any project requiring Modbus protocol communication. It's particularly useful for those building controllers, gateways, or monitoring tools that interact with PLCs, sensors, and other industrial equipment.
Developers choose tokio-modbus for its pure Rust implementation, which offers memory safety and modern async/await patterns via tokio. It provides a flexible, feature-flagged design that avoids bloat and integrates seamlessly into Rust ecosystems, unlike C-based alternatives.
A tokio-based modbus library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Built entirely in Rust for memory safety and modern async patterns via tokio, reducing vulnerabilities common in C-based alternatives, as emphasized in the README's 'Pure Rust library' feature.
Offers both asynchronous non-blocking APIs (default) and optional synchronous interfaces via feature flags, catering to diverse performance and simplicity needs in industrial applications.
Supports Modbus TCP for Ethernet and Modbus RTU for serial communication, covering key industrial use cases with dedicated client and server implementations.
Uses Cargo features like 'tcp' or 'rtu-server' to include only necessary components, minimizing dependencies and binary size, as shown in the installation examples.
Heavily relies on tokio for async operations, adding complexity and overhead for projects that prefer a different async runtime or only need synchronous communication.
Lacks support for Modbus ASCII and other Modbus extensions, which may be required for legacy systems or specialized industrial equipment.
Requires proficiency in Rust and async programming, posing a barrier for teams more familiar with traditional industrial automation languages like C or ladder logic.