#modbus #ics #industrial #security #sunspec


A high-performance async implementation of the Modbus protocol using tokio

4 releases (stable)

1.3.0 May 2, 2023
1.2.0 Mar 7, 2023
1.2.0-rc1 Jan 21, 2023
1.1.0 Nov 11, 2022
0.1.1 Jan 7, 2020

#1 in #industrial

Download history 3/week @ 2023-06-07 9/week @ 2023-06-14 16/week @ 2023-06-21 19/week @ 2023-06-28 6/week @ 2023-07-05 5/week @ 2023-07-12 9/week @ 2023-07-19 9/week @ 2023-07-26 7/week @ 2023-08-02 9/week @ 2023-08-09 13/week @ 2023-08-16 8/week @ 2023-08-23 5/week @ 2023-08-30 21/week @ 2023-09-06 14/week @ 2023-09-13 5/week @ 2023-09-20

51 downloads per month
Used in rodbus-client

Custom license

6.5K SLoC

Commercial library by Step Function I/O

A high-performance implementation of the Modbus protocol using Tokio and Rust's async/await syntax.


  • Panic-free parsing
  • Correctness and compliance to the specification
  • Built-in logging and protocol decoding
  • Automatic connection management with configurable reconnect strategy
  • Scalable performance using Tokio's multi-threaded executor
  • TLS is implemented using rustls not openssl
  • Model-generated bindings for C, C++, Java, and .NET Core
  • Runs on all platforms and operating systems supported by the Tokio runtime:
    • Official support for: Windows x64 and Linux x64, AArch64, ARMv7 and ARMv6
    • Unofficial support: MacOS, PowerPC, MIPS, FreeBSD, and others

Supported Modes

  • TCP, RTU (serial), and Modbus security (TLS) with and without X.509 extension containing the user role.
  • Client and server

Function Codes

The client and server examples demonstrate simple usage of the API.

The following function codes are supported:

  • Read Coils (0x01)
  • Read Discrete Inputs (0x02)
  • Read Holding Registers (0x03)
  • Read Input Registers (0x04)
  • Write Single Coil (0x05)
  • Write Single Register (0x06)
  • Write Multiple Coils (0x0F)
  • Write Multiple Registers (0x10)


This library is publicly available under a non-commercial / non-production license. Refer to LICENSE.txt for the terms of this non-commercial license.

This software is publicly available, but is not "open source". You must purchase a commercial license to use this software for profit.

Please inquire about commercial licensing on our website:


Cargo Features

Default features can be disabled at compile time:

  • tls - Build the library with support for TLS (secure Modbus)
  • serial - Build the library with support for Modbus RTU and serial ports


Bindings in C, C++, java, and .NET Core are available for this library. See the documentation for more details.


~220K SLoC