AtherEnergy / rumqtt

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

Allow to dissable default features #137

Open manifest opened 5 years ago

manifest commented 5 years ago

In our case we don't need any http-related features rumqtt, but they can't be disabled at the moment.

rumqtt = { version = "0.30", default-features = false }
   Compiling rumqtt v0.30.1
error[E0432]: unresolved import `crate::client::network::stream`
 --> /Users/manifest/.cargo/registry/src/github.com-1ecc6299db9ec823/rumqtt-0.30.1/src/client/connection.rs:3:14
  |
3 |     network::stream::NetworkStream,
  |              ^^^^^^ could not find `stream` in `network`

error[E0432]: unresolved import `crate::client::network::stream`
 --> /Users/manifest/.cargo/registry/src/github.com-1ecc6299db9ec823/rumqtt-0.30.1/src/client/network.rs:3:29
  |
3 | use crate::client::network::stream::NetworkStream;
  |                             ^^^^^^ could not find `stream` in `network`

error[E0432]: unresolved import `serde_derive`
 --> /Users/manifest/.cargo/registry/src/github.com-1ecc6299db9ec823/rumqtt-0.30.1/src/client/network.rs:5:5
  |
5 | use serde_derive::{Deserialize, Serialize};
  |     ^^^^^^^^^^^^ use of undeclared type or module `serde_derive`

error[E0432]: unresolved import `chrono`
   --> /Users/manifest/.cargo/registry/src/github.com-1ecc6299db9ec823/rumqtt-0.30.1/src/client/network.rs:250:9
    |
250 |     use chrono::{Duration, Utc};
    |         ^^^^^^ did you mean `pretty_env_logger::chrono`?

error[E0432]: unresolved import `jsonwebtoken`
   --> /Users/manifest/.cargo/registry/src/github.com-1ecc6299db9ec823/rumqtt-0.30.1/src/client/network.rs:251:9
    |
251 |     use jsonwebtoken::{encode, Algorithm, Header};
    |         ^^^^^^^^^^^^ use of undeclared type or module `jsonwebtoken`

error: cannot determine resolution for the derive macro `Deserialize`
   --> /Users/manifest/.cargo/registry/src/github.com-1ecc6299db9ec823/rumqtt-0.30.1/src/client/network.rs:254:32
    |
254 |     #[derive(Debug, Serialize, Deserialize)]
    |                                ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the derive macro `Serialize`
   --> /Users/manifest/.cargo/registry/src/github.com-1ecc6299db9ec823/rumqtt-0.30.1/src/client/network.rs:254:21
    |
254 |     #[derive(Debug, Serialize, Deserialize)]
    |                     ^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: aborting due to 7 previous errors
tekjar commented 5 years ago

Hi. I still need to sanitize feature gates. This isn't a priority at the moment though