-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
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
What would be the smallest setting with tokio? #88
Comments
Should be like this:
|
thank you for your answer @link2xt but when I use error[E0252]: the name `AsyncReadExt` is defined multiple times
--> /opt/cargo/registry/src/index.crates.io-6f17d22bba15001f/async-native-tls-0.5.0/src/runtime.rs:9:39
|
6 | pub(crate) use futures_util::io::{AsyncReadExt, AsyncWriteExt};
| ------------ previous import of the trait `AsyncReadExt` here
...
9 | pub(crate) use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite};
| ^^^^^^^^^^^^ `AsyncReadExt` reimported here
|
= note: `AsyncReadExt` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
9 | pub(crate) use tokio::io::{AsyncRead, AsyncReadExt as OtherAsyncReadExt, AsyncWrite}; Even if I use tokio 1.0. |
You also need to disable default
async-native-tls still enables async-std runtime by default for backwards compatibility. |
Yay !! If this can help, I ended up with : [dependencies]
anyhow = "1"
async-imap = { path = "../", default-features = false, features = [ "tokio", "runtime-tokio" ] }
async-native-tls = { version = "0.5", default-features = false, features = [ "runtime-tokio" ] }
futures = "0.3.28"
tokio = { version = "1.32", features = ["net", "io-util", "time", "rt", "rt-multi-thread", "macros"] }
|
Bruno, if you feel like opening a little documentation PR that would be useful i think.
…On Mon, Sep 04, 2023 at 12:47 -0700, Bruno Thomas wrote:
Yay !!
It works. Thank you for your patience.
it this can help, I ended up with :
```toml
[dependencies]
anyhow = "1"
async-imap = { path = "../", default-features = false, features = [ "tokio", "runtime-tokio" ] }
async-native-tls = { version = "0.5", default-features = false, features = [ "runtime-tokio" ] }
futures = "0.3.28"
tokio = { version = "1.32", features = ["net", "io-util", "time", "rt", "rt-multi-thread", "macros"] }
```
--
Reply to this email directly or view it on GitHub:
#88 (comment)
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
Thanks for the library. I'm using it with others for a load injector. I'm depending already on tokio.
I have this compilation error:
I have reproduced a similar compilation issue with the example: I removed optional features and set tokio as configured in my project (that includes same features from tokio i.e.
rt-multi-thtread
andmacros
). So I came with the followingCargo.toml
:And the headers from the idle file:
What is missing or is misconfigured in this file?
(sorry if it's a dumb question, I'm not a rust advanced user yet)
The text was updated successfully, but these errors were encountered: