AtherEnergy / rumqtt

Pure rust mqtt cilent
The Unlicense
202 stars 71 forks source link

Feature-gate JWT #63

Closed nanomad closed 6 years ago

nanomad commented 6 years ago

This makes JWT support optional in order not to pull the jsonwebtoken dependency. The "jwt" feature is on by default in order not to break backwards compatibility.

Long story short .. my projects depends on both rumqtt and rocket and they have a conflicting transitive dependency on ring

tekjar commented 6 years ago

@nanomad I thought rust allows transitive dependencies

nanomad commented 6 years ago

@tekjar Unfortunately not always, especially if the conflicting dependency is pulling in native code (as you can't link against two different versions of the same native library)

error: multiple packages link to native library `ring-asm`, but a native library can be linked only once

package `ring v0.11.0`
    ... which is depended on by `cookie v0.9.2`
    ... which is depended on by `rocket v0.3.6`
    ... which is depended on by `iot-web-ui v0.1.0 (file:///C:/Users/nanomad/IdeaProjects/rust/iot-web-ui)`
links to native library `ring-asm`

package `ring v0.12.1`
    ... which is depended on by `jsonwebtoken v4.0.0`
    ... which is depended on by `rumqtt v0.20.0 (https://github.com/AtherEnergy/rumqtt?branch=tokio2#80dcf1ce)`
    ... which is depended on by `iot-web-ui v0.1.0 (file:///C:/Users/nanomad/IdeaProjects/rust/iot-web-ui)`
also links to native library `ring-asm`
tekjar commented 6 years ago

Thanks (: . Are you using TLS by any chance?

nanomad commented 6 years ago

Not yet, planning on doing a test run later as I've just finished to migrate everything to rumqtt and rocket. Did you notice anything weird?

tekjar commented 6 years ago

@nanomad Yeah. Tls with clean session = false is failing. Broker is closing the connection.