mqtt-tiny
Welcome to mqtt-tiny
🎉
mqtt-tiny
is a tiny, no-std
-compatible
MQTT 3.1.1 codec implementation. It is currently
limited to packet en- and decoding, and does not handle state or transport-level stuff.
Example
use ;
use ;
// Connect to a server
let mut connection = connect.expect;
new.expect
.write.expect;
// Await CONNACK
let connack = try_read.expect;
assert_eq!;
// Sleep 3s
const PAUSE: Duration = from_secs;
sleep;
// Disconnect
new.write.expect;
Storage Backings
You can configure different predefined storage backings via feature flags:
std::vec::Vec
via thestd
feature flagheapless::Vec
via theheapless
feature flagarrayvec::ArrayVec
via thearrayvec
feature flag
Please note that the different predefined backings are mutually exclusive.