Welcome to the modbus-rs documentation. This guide covers both client and server development across all supported transports and environments.
| I want to... | Go to |
|---|---|
| Build a Modbus client application | Client Documentation |
| Build a Modbus server application | Server Documentation |
| Build with Python bindings | Python Bindings |
| Build with .NET / C# bindings | .NET Bindings |
| Build with Go bindings | Go Bindings |
| Build with Node.js bindings | Node.js Bindings |
| Build with WebAssembly bindings | WebAssembly Bindings |
| Migrate from an older version | Migration Guides |
Everything you need to build Modbus client applications.
| Document | Description |
|---|---|
| Client Overview | Introduction and navigation |
| Quick Start | Get your first client running in minutes |
| Examples Reference | All examples with descriptions and run commands |
| Building Applications | Callbacks, poll loop, transport setup |
| Feature Flags | Enable only what you need |
| Architecture | State machine, transport layer, services |
| Policies | Retry, backoff, jitter, timeout configuration |
| Async Development | Tokio-based async client APIs |
| C/FFI Development | Native C client bindings |
| WASM Development | Browser WebSocket client |
| Python Bindings | Python client/server usage via mbus-ffi |
| .NET / C# Bindings | .NET (C#) client/server via P/Invoke |
| Go Bindings | Go client/server/gateway via cgo over mbus-ffi |
| Node.js Bindings | Node.js client/server/gateway via napi-rs over mbus-ffi |
Everything you need to build Modbus server applications.
| Document | Description |
|---|---|
| Server Overview | Introduction and navigation |
| Quick Start | Get your first server running in minutes |
| Examples Reference | All examples with descriptions and run commands |
| Building Applications | ModbusAppHandler, transports, poll loop |
| Feature Flags | Enable only what you need |
| Architecture | Request dispatch, queuing, resilience |
| Policies | Timeout, overflow, broadcast, priority queue |
| Function Codes | Supported FCs with callback mapping |
| Derive Macros | CoilsModel, HoldingRegistersModel, modbus_app |
| Write Hooks | Pre-write approval and validation |
Bridge upstream Modbus clients to downstream Modbus devices across different transports (TCP ↔ RTU, WebSocket ↔ TCP, etc.).
| Document | Description |
|---|---|
| Quick Start | Sync, async TCP, and WebSocket gateway in minutes |
| WebSocket Gateway | AsyncWsGatewayServer — WASM client → raw TCP/RTU bridge |
| Architecture | Request flow, transaction remapping, session model |
| Routing | UnitRouteTable, RangeRouteTable, custom policies |
| Feature Flags | async, ws-server, serial-rtu, no_std usage |
| no_std Usage | Embedded / bare-metal sync gateway core |
| Crate | Purpose | Docs |
|---|---|---|
modbus-rs |
Top-level facade crate | Client / Server |
mbus-client |
Client state machine | Client Docs |
mbus-server |
Server runtime | Server Docs |
mbus-core |
Protocol types, transport trait | Shared |
mbus-async |
Async facade | Client Async |
mbus-network |
TCP transport | Client / Server |
mbus-serial |
Serial RTU/ASCII transports | Client / Server |
mbus-ffi |
C, WASM, Python, .NET, Go, and Node.js bindings | C Bindings / WASM / Python / .NET / Go / Node.js |
- Contributing Guide — How to contribute
- Release Checklist — Release process
- License — GPLv3
Commercial licenses are also available for proprietary use; contact ch.raghava44@gmail.com.
- GitHub Issues: modbus-rs/issues
- Email: ch.raghava44@gmail.com