rust-websocket-lite icon indicating copy to clipboard operation
rust-websocket-lite copied to clipboard

"default-features = false" cause compile error

Open afpro opened this issue 3 years ago • 1 comments

   Compiling websocket-lite v0.5.0
error[E0432]: unresolved import `self::inner`
  --> /Users/afpro/.cargo/registry/src/github.com-1ecc6299db9ec823/websocket-lite-0.5.0/src/ssl.rs:87:15
   |
87 | pub use self::inner::*;
   |               ^^^^^ could not find `inner` in `self`

error[E0425]: cannot find function `async_wrap` in module `ssl`
   --> /Users/afpro/.cargo/registry/src/github.com-1ecc6299db9ec823/websocket-lite-0.5.0/src/client.rs:153:31
    |
153 |             let stream = ssl::async_wrap(domain, stream).await?;
    |                               ^^^^^^^^^^ not found in `ssl`

error[E0425]: cannot find function `wrap` in module `ssl`
   --> /Users/afpro/.cargo/registry/src/github.com-1ecc6299db9ec823/websocket-lite-0.5.0/src/client.rs:169:31
    |
169 |             let stream = ssl::wrap(domain, stream)?;
    |                               ^^^^ not found in `ssl`

error: aborting due to 3 previous errors

afpro avatar Jul 02 '21 05:07 afpro

Yes, this is due to the ssl-native-tls and ssl-openssl features being an either/or selection.

Maybe default-features = false should deactivate SSL completely.

1tgr avatar Jul 03 '21 16:07 1tgr