https://github.com/rbino/zanzara
Allocation-free, I/O-agnostic MQTT client written in Zig
https://github.com/rbino/zanzara
mqtt mqtt-client zig
Last synced: 5 months ago
JSON representation
Allocation-free, I/O-agnostic MQTT client written in Zig
- Host: GitHub
- URL: https://github.com/rbino/zanzara
- Owner: rbino
- License: mit
- Created: 2021-06-14T18:38:24.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-07-19T20:30:25.000Z (almost 4 years ago)
- Last Synced: 2025-04-15T06:27:44.251Z (about 1 year ago)
- Topics: mqtt, mqtt-client, zig
- Language: Zig
- Homepage:
- Size: 86.9 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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
- [x] MQTT 3.1.1 client packet serialization/deserialization
- [x] Ping handling
- [x] Subscribe and receive data
- [x] Publish (QoS 0 only)
- [x] 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"
```