// the find
eclipse-paho/paho.mqtt.rust
paho.mqtt.rust
Safe Rust wrapper around the Paho C MQTT library, supporting MQTT 3.1/3.1.1/v5 with async/await, TLS, WebSockets, and QoS 0-2. It's a C FFI binding at heart, not a native Rust implementation — you're getting the Paho C library with a Rust API on top. Good fit for production IoT or embedded work where you need a battle-tested MQTT stack and don't mind the C dependency.
The async API is runtime-agnostic — works with tokio or smol without pulling in either as a hard dependency, which is the right call. Pre-generated bindings for common targets (x86_64, ARM, aarch64) mean you don't need bindgen or Clang in your CI pipeline for standard platforms. MQTT v5 support including properties and reason codes is there and recent v0.14 adds a unified event stream so you get connect/disconnect/message events from one channel instead of scattered callbacks. Cross-compilation story is solid — the cmake crate handles the C build automatically and there's working musl/static binary guidance.
It's locked to Paho C v1.3.x and will not build against newer C library versions because upstream extends structs in breaking ways — if Paho C ever ships a v2 you're stuck waiting for this crate to catch up. The segfault risk from pre-generated bindings is real enough that the README explicitly warns about it and tells you to try build_bindgen first, which is not a confidence-inspiring onboarding experience. 586 stars after years of existence suggests this is not the community's favorite MQTT option — rumblemoose/mqtt-async-client and the pure-Rust rumqttc have more momentum now. No built-in reconnect backoff strategy exposed at the Rust layer; you get automatic reconnect but no control over the retry schedule from safe Rust.