Skip to content
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

MaybeTlsStream as a separate crate. #349

Open
jakoschiko opened this issue Sep 9, 2024 · 3 comments
Open

MaybeTlsStream as a separate crate. #349

jakoschiko opened this issue Sep 9, 2024 · 3 comments

Comments

@jakoschiko
Copy link

The type tokio_tungstenite::MaybeTlsStream looks very useful. Any interest in moving it to a separate crate?

I'm currently trying to add optional TLS support for an IMAP library and need exactly that, an enum that implements AsyncRead and AsyncWrite. But I don't want to manage dependency updates of rustls and native-tls myself. If I could simply point the users of my library to a separate crate it would be very helpful.

Maybe related to #285

@jakoschiko
Copy link
Author

Just to be clear: I don't want to maintain such a type only for my own project. I'm happy to help maintaining it in a shared project.

@daniel-abramov
Copy link
Member

Yeah, IIRC we were asked about this a couple of times within the past years.

I wonder if there is already a similar, more generic alternative. I did not have plans to create a new crate just for MaybeTlsStream, but if someone makes such a crate, we'd be happy to switch to it to spare some boilerplate code. I did not check how other similar crates manage this kind of thing.

@jakoschiko
Copy link
Author

Okay, I'll investigate it. Eventually I'll create a crate and inform you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants