Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 946 Bytes

README.md

File metadata and controls

38 lines (27 loc) · 946 Bytes

zanzara

An allocation-free, I/O-agnostic MQTT client written in Zig.

Warning: this is a work in progress, the API is subject to change

Features

  • MQTT 3.1.1 client packet serialization/deserialization
  • Ping handling
  • Subscribe and receive data
  • Publish (QoS 0 only)
  • Unsubscribe
  • Everything else (including a more detailed list of what's missing)

Example

You can run the example with:

zig run example.zig

You can use mosquitto_sub to see the message that is published by the example just after the connection

mosquitto_sub -h "mqtt.eclipseprojects.io" -t "zig/zanzara_out"

You can use also mosquitto_pub to publish to the topic the example subscribes to

mosquitto_pub -h "mqtt.eclipseprojects.io" -t "zig/zanzara_in" -m "Hello, MQTT"