13 releases (7 breaking)

0.8.0 Nov 1, 2023
0.7.0 Jun 22, 2023
0.6.2 Apr 5, 2023
0.6.1 Nov 3, 2022
0.1.0 Aug 27, 2020

#110 in Embedded development

Download history 65/week @ 2023-12-15 74/week @ 2023-12-22 38/week @ 2023-12-29 84/week @ 2024-01-05 221/week @ 2024-01-12 180/week @ 2024-01-19 117/week @ 2024-01-26 101/week @ 2024-02-02 203/week @ 2024-02-09 146/week @ 2024-02-16 202/week @ 2024-02-23 244/week @ 2024-03-01 142/week @ 2024-03-08 142/week @ 2024-03-15 286/week @ 2024-03-22 283/week @ 2024-03-29

901 downloads per month
Used in 5 crates

MIT license

195KB
4K SLoC

QUARTIQ Matrix Chat Continuous Integration

Minimq

Minimq provides a minimal MQTTv5 client and message parsing for the MQTT version 5 protocol. It leverages the embedded-nal to operate on top of any TCP stack implementation and is actively used with both smoltcp and and the W5500 hardware network stack.

Minimq provides a simple, no_std interface to connect to an MQTT broker to publish messages and subscribe to topics.

Features

Minimq supports all of the fundamental operations of MQTT, such as message subscription and publication. Below is a detailed list of features, indicating what aspects are supported:

  • Publication at all quality-of-service levels (at-most-once, at-least-once, and exactly-once)
  • Retained messages
  • Connection will messages
  • Session state reconnection and republication
  • Topic subscriptions at all quality-of-service levels
  • Subscription option flags
  • Zero-copy message deserialization
  • Serde-compatible MQTT message serialization and deserialization

If there are features that you would like to have that are not yet supported, we are always accepting pull requests to extend Minimq's capabilities.

Minimq also provides convenient APIs to implement request-response interfaces over MQTT leveraging the ResponseTopic and CorrelationData properties for in-bound and out-bound messages.

Smoltcp Support

If using smoltcp, check out the smoltcp-nal to quickly create an interface that can be used by Minimq.

Examples

An example usage of Minimq that can be run on a desktop PC can be found in tests/integration_test.rs

Dependencies

~3MB
~67K SLoC