7 releases

0.3.0 Jan 30, 2024
0.2.0 Dec 3, 2023
0.1.5 Jan 7, 2023
0.1.4 Jun 20, 2022
0.0.1 Apr 28, 2022

#1556 in Embedded development

Download history 35/week @ 2024-08-05 88/week @ 2024-08-12 332/week @ 2024-08-19 195/week @ 2024-08-26 322/week @ 2024-09-02 258/week @ 2024-09-09 249/week @ 2024-09-16 284/week @ 2024-09-23 200/week @ 2024-09-30 229/week @ 2024-10-07 372/week @ 2024-10-14 211/week @ 2024-10-21 314/week @ 2024-10-28 286/week @ 2024-11-04 396/week @ 2024-11-11 230/week @ 2024-11-18

1,243 downloads per month

Custom license

255KB
4.5K SLoC

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

Minimum supported Rust version (MSRV)

Rust-mqtt is guaranteed to compile on stable Rust 1.75 and up. It might compile with older versions but that may change in any new patch release.

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

Dependencies

~520–740KB
~15K SLoC