We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to use this to be able to easly switch the tls implementation between rustls and native-tls.
rustls
native-tls
Is there a way to use this crate without an async runtime, with std::net::tcp::TcpStream?
std::net::tcp::TcpStream
I tried to disable the default features to get rid of the async related stuff from this library but then I get these kind of errors:
[ERROR rust_analyzer::main_loop] FetchBuildDataError: error[E0432]: unresolved import `crate::runtime::AsyncRead` --> /home/adam/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/tls-api-0.9.0/src/async_as_sync.rs:14:5 | 14 | use crate::runtime::AsyncRead; | ^^^^^^^^^^^^^^^^^^^^^^^^^ no `AsyncRead` in `runtime` error[E0432]: unresolved import `crate::runtime::AsyncWrite` --> /home/adam/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/tls-api-0.9.0/src/async_as_sync.rs:15:5 | 15 | use crate::runtime::AsyncWrite; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `AsyncWrite` in `runtime` error[E0432]: unresolved import `crate::runtime::AsyncRead` --> /home/adam/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/tls-api-0.9.0/src/socket.rs:1:5 | 1 | use crate::runtime::AsyncRead; | ^^^^^^^^^^^^^^^^^^^^^^^^^ no `AsyncRead` in `runtime` error[E0432]: unresolved import `crate::runtime::AsyncWrite` --> /home/adam/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/tls-api-0.9.0/src/socket.rs:2:5 | 2 | use crate::runtime::AsyncWrite; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `AsyncWrite` in `runtime` error[E0432]: unresolved import `crate::spi_async_socket_impl_delegate` --> /home/adam/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/tls-api-0.9.0/src/socket_box.rs:8:5 | 8 | use crate::spi_async_socket_impl_delegate; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `spi_async_socket_impl_delegate` in the root error[E0432]: unresolved import `crate::spi_async_socket_impl_delegate` --> /home/adam/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/tls-api-0.9.0/src/stream.rs:4:5 | 4 | use crate::spi_async_socket_impl_delegate; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `spi_async_socket_impl_delegate` in the root error[E0432]: unresolved import `crate::runtime::AsyncRead` --> /home/adam/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/tls-api-0.9.0/src/stream_with_socket.rs:8:5 | 8 | use crate::runtime::AsyncRead; | ^^^^^^^^^^^^^^^^^^^^^^^^^ no `AsyncRead` in `runtime` error[E0432]: unresolved import `crate::runtime::AsyncWrite` --> /home/adam/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/tls-api-0.9.0/src/stream_with_socket.rs:9:5 | 9 | use crate::runtime::AsyncWrite; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `AsyncWrite` in `runtime` error[E0432]: unresolved import `crate::spi_async_socket_impl_delegate` --> /home/adam/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/tls-api-0.9.0/src/stream_with_socket.rs:12:5 | 12 | use crate::spi_async_socket_impl_delegate; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `spi_async_socket_impl_delegate` in the root error: cannot determine resolution for the macro `spi_async_socket_impl_delegate` --> /home/adam/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/tls-api-0.9.0/src/socket_box.rs:49:1 | 49 | spi_async_socket_impl_delegate!(AsyncSocketBox); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: import resolution is stuck, try simplifying macro imports error: cannot determine resolution for the macro `spi_async_socket_impl_delegate` --> /home/adam/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/tls-api-0.9.0/src/stream.rs:52:1 | 52 | spi_async_socket_impl_delegate!(TlsStream); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: import resolution is stuck, try simplifying macro imports error: cannot determine resolution for the macro `spi_async_socket_impl_delegate` --> /home/adam/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/tls-api-0.9.0/src/stream_with_socket.rs:114:1 | 114 | spi_async_socket_impl_delegate!(TlsStreamWithSocket<S>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: import resolution is stuck, try simplifying macro imports error: aborting due to 12 previous errors For more information about this error, try `rustc --explain E0432`. error: could not compile `tls-api` due to 13 previous errors
The text was updated successfully, but these errors were encountered:
From the quick scan of the code, it seems like this crate only provides async API.
https://github.com/stepancheg/rust-tls-api/blob/master/api/src/socket.rs#L5-L10
You should also provide your source code when showing error messages - it is hard to reason about the output if one does not know the input.
Sorry, something went wrong.
No branches or pull requests
I am trying to use this to be able to easly switch the tls implementation between
rustls
andnative-tls
.Is there a way to use this crate without an async runtime, with
std::net::tcp::TcpStream
?I tried to disable the default features to get rid of the async related stuff from this library but then I get these kind of errors:
The text was updated successfully, but these errors were encountered: