-
Notifications
You must be signed in to change notification settings - Fork 177
feat(s2n-quic): allow s2n-quic to use s2n-tls on Windows with MinGW #3153
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
Merged
boquan-fang
merged 9 commits into
aws:main
from
boquan-fang:boquan-fang/s2n-tls-integration
Aug 4, 2026
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d1be919
feat(s2n-quic): allow s2n-quic to use s2n-tls on Windows with MinGW
boquan-fang 7fe6cc3
Merge branch 'main' into boquan-fang/s2n-tls-integration
boquan-fang ee7eb33
address PR comments:
boquan-fang cfdd235
Merge branch 'main' into boquan-fang/s2n-tls-integration
boquan-fang b472a26
remove unused deps in ci because of openssl removal
boquan-fang 2d8b5cc
fix the exclude in CI:
boquan-fang fb4971f
Merge branch 'main' into boquan-fang/s2n-tls-integration
boquan-fang 3de6c67
address PR comments:
boquan-fang fb48970
make s2n-tls the default for Windows MinGW
boquan-fang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| //! Emits cfgs describing which optional test dependencies are available for the | ||
| //! current target, so the tests can be gated on the reason rather than on a | ||
| //! repeated platform matrix. | ||
| //! | ||
| //! These must stay in sync with the corresponding `[target.'cfg(..)'.dependencies]` | ||
| //! sections in `Cargo.toml`; Cargo cannot select dependencies based on a cfg emitted | ||
| //! by a build script. | ||
|
|
||
| fn main() { | ||
| println!("cargo::rustc-check-cfg=cfg(s2n_tls_provider)"); | ||
| println!("cargo::rustc-check-cfg=cfg(boringssl)"); | ||
|
|
||
| let target_os = env("CARGO_CFG_TARGET_OS"); | ||
| let target_env = env("CARGO_CFG_TARGET_ENV"); | ||
| let is_unix = std::env::var_os("CARGO_CFG_UNIX").is_some(); | ||
| let is_windows = target_os == "windows"; | ||
|
|
||
| // s2n-tls builds on unix and on Windows with the GNU/MinGW toolchain, but not with MSVC. | ||
| if is_unix || (is_windows && target_env == "gnu") { | ||
| println!("cargo::rustc-cfg=s2n_tls_provider"); | ||
| } | ||
|
|
||
| // quiche depends on BoringSSL, which builds on unix and on Windows MSVC, but not with the | ||
| // Windows MinGW-family toolchains. | ||
| if !is_windows || target_env == "msvc" { | ||
| println!("cargo::rustc-cfg=boringssl"); | ||
| } | ||
| } | ||
|
|
||
| fn env(name: &str) -> String { | ||
| std::env::var(name) | ||
| .unwrap_or_else(|_| panic!("build script missing {name:?} environment variable")) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,11 @@ | ||
| // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| #[cfg(not(unix))] | ||
| // s2n-tls builds on unix and on Windows with the GNU/MinGW toolchain, but not with MSVC. Use it as | ||
| // the default provider wherever it builds; fall back to rustls elsewhere (notably Windows MSVC). | ||
| // | ||
| // Keep in sync with the target-specific dependencies in Cargo.toml. | ||
| #[cfg(not(any(unix, all(target_os = "windows", target_env = "gnu"))))] | ||
| pub use s2n_quic_rustls::*; | ||
| #[cfg(unix)] | ||
| #[cfg(any(unix, all(target_os = "windows", target_env = "gnu")))] | ||
| pub use s2n_quic_tls::*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.