-
-
Notifications
You must be signed in to change notification settings - Fork 412
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
async_std support #502
Comments
Thanks for the issue! I think the right way to approach this is to make |
Due to async-rs/async-std#293 quinn’s |
From what i understand you could replace the tokio dependency with smol & futures-io:
However you would need to find a non tokio alternative for tokio_util::codec, although it wouldn't be too hard to adapt the code. I think this should make quinn abstract over runtime. |
My understanding is that this amounts to a hidden hard dep on a smol background thread, so we'd just be trading one required runtime for another. Unless I misunderstand how smol works these days? I'd prefer to be genuinely runtime-agnostic as outlined above.
Indeed that's pretty trivial code, which we could easily vendor if need be. |
Right. The only real benefit is that you can run your quinn sockets in a non-tokio runtime without crashing. |
You can spawn a thread to run tokio in the background too (you just have to wrap the initial setup in |
Thanks for your interest, regardless! Hopefully this type of composability problem gets easier to address in the future. |
Hi, @Ralith! I would like to bring up this issue once again. Any progress in this direction? We would like to use |
@yvonmanzi so far no progress has been made on this issue (that I am aware of). We'll mentor you through implementing if that's of interest to you, or otherwise I can provide commercial support if that's an option. |
Thank you @djc for a quick response. I definitely appreciate the mentorship. I am going to start looking into various routes through which I can approach this. Any pointers, advice, etc for me to look into before I get started would go a long way. |
You could maybe look at the trust-dns crate for some examples. It has a |
Okay, thanks! |
Hello @Ralith @djc we want to add QUIC support to tremor which uses |
@aryan9600 I'm not aware of any progress so far. Would be great if you can work on this, will be happy to guide you along. |
You don't actually need to use smol to interrop. All you need is to lazy initialize a tokio::runtime::Handle and then call |
I have the quinn server example running with async-std, if there is still interest I could implement async-std and tokio support using two seperate feature flags. |
This would be lovely. I can help too if needed. |
Fix drafted in #1364. Review from people familiar with async-std would be particularly welcome. |
quinn-proto
is extremely low-level and difficult to use.quinn
is much nicer to use, but depends on Tokio. Would it be possible forquinn
to also supportasync_std
via a Cargo feature?The text was updated successfully, but these errors were encountered: