Something went wrong. Try again.
An MQTT 5.0 and 3.1.1 client for Zig: a sans-I/O core, TCP, TLS, WebSocket and wss transports, SASL authentication, and reconnection
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354.{ .name = .mqtt, .version = "0.4.0", .fingerprint = 0xa100fb72c4e7791a, // Changing this has security and trust implications. .minimum_zig_version = "0.17.0", .dependencies = .{ // tls.zig rather than `std.crypto.tls.Client`. Three things the // standard library's client does not do and this does: client // certificates, ALPN, and a handshake with servers that omit the // optional TLS 1.3 middlebox-compatibility record. It also has no // minimum size for the plaintext read buffer, which is where the // standard library quietly truncated large messages. // // The fork at git.jcollie.dev, on its `quic-0.17` branch: upstream's // `main` with QUIC added, which is the tls.zig zig-http and zig-quic // build on too. What this library needs from it is the alert handling, // which upstream now has as well: an alert the broker sent is kept and // reported rather than discarded, and only failures that are this // end's fault produce one. `Transport.Tls.lastError` is built on that // -- without it, a broker refusing a client certificate arrives as a // bare `ReadFailed` and there is nothing to tell a user. .tls = .{ .url = "https://git.jcollie.dev/jeff/tls.zig/archive/e689dc9d9fd36a6a53b121f87073c72dcba4903d.tar.gz", .hash = "tls-0.1.0-ER2e0gB8CQA1POILS85Nvchyyd7qS4V7OEQ-nDYvQv-K", }, // The framing and the client handshake of RFC 6455, for MQTT over // WebSocket. Only the `websocket` module is taken: the server half of // the handshake lives in a second module that depends on an HTTP // server library, and a client has no use for it. .websocket = .{ .url = "https://git.jcollie.dev/jeff/zig-websocket/archive/f87d88e50d2958d4db924f976ccdf9771a21bc71.tar.gz", .hash = "zig_websocket-0.2.0-pVY3uApgAwCl-o2F9NnqhtG9P_CNkrjrQMf6SiSzFtlG", }, // SASL, for MQTT 5.0 §4.12's extended authentication. The interface // only: a mechanism is the caller's to bring, and zig-sasl itself has // no dependencies at all, so this costs a consumer nothing but the // mechanisms it already wanted. .sasl = .{ .url = "https://git.jcollie.dev/jeff/zig-sasl/archive/7d24d756b4282cd2ade3dfab89f687c6bceba72a.tar.gz", .hash = "sasl-0.2.0-s3YcODExAgAqtthLl760dKPZ2Z-Sl8eqtExKVN3y0guL", }, }, .paths = .{ "build.zig", "build.zig.zon", "src", "tests", "tools", "LICENSES", "REUSE.toml", "README.md", },}