Apache License 2.0

项目介绍

slowtec/tokio-modbus 是一个托管在 GitHub 上的开源项目,主要使用 Rust 编写,采用 Apache License 2.0 许可证,目前获得 571 个 Star、159 次 Fork。

仓库全名
slowtec/tokio-modbus
开源许可证
Apache License 2.0
Star 数
571
Fork 数
159
未关闭 Issue
46

README 摘要

tokio-modbus A pure Rust Modbus library based on tokio. Modbus is based on a master/slave>) communication pattern. To avoid confusion with the Tokio terminology the master is called client and the slave is called server in this library. Features Pure Rust library Modbus TCP or RTU at your choice Both async (non-blocking, default) and sync (blocking, optional) Client API Server implementations for out-of-the-box…

完整内容见 GitHub 原始 README 或本页 。

常见问题

tokio-modbus 用什么语言开发?

主要使用 Rust 编写,采用 Apache License 2.0 许可证,目前有 571 个 Star。

tokio-modbus 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 tokio-modbus 的源码?

可以直接克隆仓库:git clone https://github.com/slowtec/tokio-modbus.git,默认分支为 main;安装与运行步骤见仓库 README。

tokio-modbus 最近还在维护吗?

仓库最近一次更新为 7月23日,当前有 46 个未关闭 Issue;Star 数为 571,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

A tokio-based modbus library

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
903
价值分
389
活跃状态
活跃

语言占比

Rust
Shell

README

tokio-modbus

A pure Rust Modbus library based on tokio.

Crates.io Docs.rs Security audit Continuous integration MIT licensed Apache 2.0 licensed

Modbus is based on a master/slave communication pattern. To avoid confusion with the Tokio terminology the master is called client and the slave is called server in this library.

Features

  • Pure Rust library
  • Modbus TCP or RTU at your choice
  • Both async (non-blocking, default) and sync (blocking, optional)
  • Client API
  • Server implementations
    • for out-of-the-box usage or
    • as a starting point for a customized implementation
  • Open source (MIT/Apache-2.0)

Installation

Add this to your Cargo.toml:

[dependencies]
tokio-modbus = "*"

Cargo Features

  • "rtu": Asynchronous RTU client (default)
  • "tcp": Asynchronous TCP client (default)
  • "rtu-sync: Synchronous RTU client
  • "tcp-sync": Synchronous TCP client
  • "rtu-server": (Asynchronous) RTU server
  • "tcp-server": (Asynchronous) TCP server
  • "rtu-over-tcp-server": (Asynchronous) RTU over TCP server
Examples

If you only need an asynchronous TCP client add the following line to your Cargo.toml file:

[dependencies]
tokio-modbus = { version = "*", default-features = false, features = ["tcp"] }

For an asynchronous RTU client:

[dependencies]
tokio-modbus = { version = "*", default-features = false, features = ["rtu"] }

For an RTU server:

[dependencies]
tokio-modbus = { version = "*", default-features = false, features = ["rtu-server"] }

For a TCP server:

[dependencies]
tokio-modbus = { version = "*", default-features = false, features = ["tcp-server"] }

Examples

Various examples for Modbus RTU and TCP using either the asynchronous or synchronous API can be found in the examples folder.

Testing

The workspace contains documentation, tests, and examples for all available features.

cargo test --workspace
cargo test --workspace --all-features

Protocol-Specification

License

Copyright © 2017-2026 slowtec GmbH

MIT/Apache-2.0

评论

暂无评论