Rust native mqtt client for both std and no_std environmnents. https://github.com/obabec/rust-mqtt
Go to file
Ulf Lilleengen 03546536b2
Use traits from embedded-io (#19)
* Use embedded-io and embedded-nal-async

Rather than rolling it's own trait implementations, make use of the
traits from embedded-io for connection read/write and embedded-nal-async
for connection close.

Remove NetworkConnectionFactory abstraction. If needed, the TcpClient
abstraction from e-n-a can be used.

* Remove unneeded tokio feature
2022-06-20 09:55:33 +02:00
.ci Rand and Unsubsribe (#14) 2022-04-28 13:39:47 +02:00
.github/workflows Publish workflow (#15) 2022-04-28 14:11:40 +02:00
src Use traits from embedded-io (#19) 2022-06-20 09:55:33 +02:00
tests Use traits from embedded-io (#19) 2022-06-20 09:55:33 +02:00
.gitignore Rust MQTT 2022-03-12 15:56:37 +01:00
Cargo.toml Use traits from embedded-io (#19) 2022-06-20 09:55:33 +02:00
LICENSE Add licences 2022-02-27 19:41:21 +01:00
README.md Change readme for example 2022-04-28 14:44:29 +02:00
rust-toolchain.toml Move tests and latest rust (#8) 2022-03-16 11:38:30 +01:00

Rust-mqtt

About

Rust-mqtt is native MQTT client for both std and no_std environments. Client library provides async API which can be used with various executors. Currently, supporting only MQTTv5 but everything is prepared to extend support also for MQTTv3 which is planned during year 2022.

Async executors

For desktop usage I recommend using Tokio async executor and for embedded there is prepared wrapper for Drogue device framework in the Drogue-IoT project examples mqtt module.

Restrains

Client supports following:

  • QoS 0 & QoS 1 (All QoS 2 packets are mapped for future client extension)
  • Only clean session
  • Retain not supported
  • Auth packet not supported
  • Packet size is not limited, it is totally up to user (packet size and buffer sizes have to align)

Building

cargo build

Running tests

Integration tests are written using tokio network tcp stack and can be find under tokio_net.

cargo test unit
cargo test integration
cargo test load

Acknowledgment

This project could not be in state in which currently is without Ulf Lilleengen and rest of the community from Drogue IoT.

Contact

For any information contact me on email ond.babec@gmail.com