-
Notifications
You must be signed in to change notification settings - Fork 88
(feat) Provide example integration with Rustls crate #138
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
Conversation
By checking this code in as an example, we can prevent bitrot as we continuously test this in CI. It also demonstrates how to setup TLS without relying on platform specific dependencies via native_tls crate.
The underlying Rust library for crypto `ring` using multiple `#[cfg_attr()]` properties together which stabilized in rust 1.33.0: https://github.com/rust-lang/rust/blob/stable/RELEASES.md#language-4 Previously, everything else in this could be compiled with rust 1.32.0, so this may constitute a breaking change.
examples/rustls.rs
Outdated
|
||
fn main() -> Result<(), Box<dyn Error>> { | ||
// Read config from environment or .env file | ||
dotenv().ok(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we probably don't need to include dotenv in this example.
I know!!! I was disappointed by this too. The current version of Rustls is tested against 1.36.0 and one of its dependencies relies on the alloc crate (cant remember which one).
There's a few things we could do here:
1. Somehow compile the rustls example code separately since everything else in the imap crate is 1.32.0 compatible (probably make a separate crate as a cargo workspace)
2. Downgrade rustls until we find something that works at a lower version number.
I'd probably opt for 1
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Perfect! I'll take it out
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Hmm... Testing with a separate version just for one subcrate will be annoying, as will not having it show up as a regular example. I think I'm inclined to keep the MSRV version bump. It's too bad, but I don't think it's actually a problem since the bump won't apply to those who rely just on the |
By checking this code in as an example, we can prevent bitrot as we continuously test this
in CI. It also demonstrates how to setup TLS without relying on platform specific dependencies
via native_tls crate.
First step of #123