LiamBindle / MQTT-C

A portable MQTT C client for embedded systems and PCs alike.
https://liambindle.ca/MQTT-C
MIT License
775 stars 275 forks source link

Cross-compilation through Zig compiler toolchain #171

Closed akgvn closed 2 years ago

akgvn commented 2 years ago

Adds a build.zig file to be able to use the Zig build system to compile a static library for Windows (x86_64), macOS (Apple Silicon and Intel) and Linux (x86_64 and ARM64).

You can try it yourself by executing zig build in the repo root and following files should be created in zig-out/lib:

libmqtt-c-apple-silicon.a
libmqtt-c-arm64.a
libmqtt-c-mac-x64.a
libmqtt-c-x64.a
mqtt-c.lib
LiamBindle commented 2 years ago

Cool!