-
Notifications
You must be signed in to change notification settings - Fork 193
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
Update rust-runtime to rustls 0.22 #3458
base: main
Are you sure you want to change the base?
Conversation
The |
This is awesome! And Hyper 1.0 is coming soon: #3461! Looks like one compilation failure in CI: https://github.com/smithy-lang/smithy-rs/actions/runs/8143069068/job/22260899311?pr=3458#step:3:1112 |
@rcoh if you're working on that PR, is it still useful for me to consider pushing this through? |
@rcoh do you have some more context on your plans for landing Hyper 1 support? I skimmed the changes in #3461, but given the creation of an "experimental" crate I'm wondering how you're planning to roll this out -- mainly to determine whether it's useful to continue pushing on this PR. |
Yeah I think it is useful. I don't know our exact timeline for stabilizing hyper 1.0 — depends on the balance between community demand and any stability issues that come up |
@djc If you'd like to be an early adopter of the hyper 1.0 client, here's a quick example: use aws_smithy_experimental::hyper_1_0::{ CryptoMode, HyperClientBuilder };
use aws_smithy_runtime_api::client::behavior_version::BehaviorVersion;
#[tokio::main]
async fn main() {
let http_client = HyperClientBuilder::default()
// Here is were we choose a crypto mode.
//
// Our choices are:
//
// - `CryptoMode::Ring`
// - `CryptoMode::AwsLc`
// - `CryptoMode::AwsLcFips`
//
// In this example, we've chosen `ring` as the crypto provider.
.crypto_mode(CryptoMode::Ring)
.build_https();
let conf = aws_config::defaults(BehaviorVersion::latest())
// Once we've built our client, all we need to do is set it
// on either the shared config struct or the service config struct.
.http_client(http_client)
.load()
.await;
let client = aws_sdk_s3::Client::new(&conf);
let buckets = client
.list_buckets()
.send()
.await
.expect("failed to list buckets");
for bucket in buckets.buckets() {
println!("{}", bucket.name().unwrap());
}
} |
Motivation and Context
Would be nice to avoid duplicate dependencies in downstream projects and generally keep up with dependencies offering their latest and (supposedly) greatest versions. While rustls 0.23 has since been released (a few days ago -- there's no compatible tokio-rustls or hyper-rustls releases yet), the 0.22 release made quite some changes that will be necessary for 0.23, so I think it still makes sense to make this upgrade.
(Note that hyper-rustls has since upgraded to hyper 1, so we'll probably need #1925 before we can upgrade to the hyper-rustls release that is compatible with rustls 0.23.)
Description
I've attempted to update rustls and related crates in the rust-runtime. So far I have not touched the
tls-stub
inci-resources
because I'm unable to compile it for reasons that aren't clear to me:I also haven't touched the examples yet.
Testing
No testing so far other than just compiling.
Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesCHANGELOG.next.toml
if I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.