-
Notifications
You must be signed in to change notification settings - Fork 723
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
fix(bindings): Specify correct minimum versions #5028
Changes from 4 commits
761106f
032669c
39741cc
4672d84
3f3f369
512e8cd
3a89ee3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -366,3 +366,45 @@ jobs: | |
- name: Run tests | ||
working-directory: ${{env.PCAP_TEST_PATH}} | ||
run: cargo test --all-features | ||
|
||
minimal-versions: | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
workspace-path: | ||
- bindings/rust/extended | ||
- bindings/rust/standard | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
id: toolchain | ||
# minimal-versions is an unstable feature, and requires the nightly toolchain: | ||
# https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#minimal-versions | ||
run: | | ||
rustup toolchain install ${{env.RUST_NIGHTLY_TOOLCHAIN}} | ||
rustup override set ${{env.RUST_NIGHTLY_TOOLCHAIN}} | ||
|
||
- uses: camshaft/rust-cache@v1 | ||
|
||
# cargo-minimal-versions requires cargo-hack: | ||
# https://crates.io/crates/cargo-minimal-versions#user-content-prerequisites | ||
- name: Install cargo-hack | ||
uses: baptiste0928/[email protected] | ||
with: | ||
crate: cargo-hack | ||
|
||
- name: Install cargo-minimal-versions | ||
uses: baptiste0928/[email protected] | ||
with: | ||
crate: cargo-minimal-versions | ||
|
||
- name: Generate | ||
run: ./${{env.ROOT_PATH}}/generate.sh --skip-tests | ||
|
||
- name: Test minimal versions | ||
id: test-minimal-versions | ||
working-directory: ${{matrix.workspace-path}} | ||
run: | | ||
cargo +${{env.RUST_NIGHTLY_TOOLCHAIN}} minimal-versions check --direct --ignore-private | ||
cargo +${{env.RUST_NIGHTLY_TOOLCHAIN}} minimal-versions check --direct --ignore-private --all-features |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,8 +36,10 @@ stacktrace = [] | |
# unstable-foo = [] | ||
|
||
[dependencies] | ||
aws-lc-rs = { version = "1" } | ||
libc = "0.2" | ||
# aws-lc-rs 1.6.4 adds DEP_AWS_LC environment variables which are required to build s2n-tls-sys. | ||
aws-lc-rs = { version = "1.6.4" } | ||
# A minimum libc version of 0.2.121 is required by aws-lc-sys 0.24.0. | ||
libc = "0.2.121" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. libc 0.2.121 is needed because aws-lc-sys versions before 0.24.0 required libc 0.2.121. aws-lc-sys 0.24.0 removed the libc dependency, so libc 0.2.62 should be acceptable for aws-lc-sys >= 0.24.0. However, I'm not aware of a way to specify a different minimum version depending on the version of another dependency in a build. We could alternatively specify a higher minimum version for aws-lc-rs, so that aws-lc-sys doesn't specify any libc requirement. |
||
|
||
[build-dependencies] | ||
cc = { version = "1.0.100", features = ["parallel"] } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
name = "bench" | ||
version = "0.1.0" | ||
edition = "2021" | ||
publish = false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
[dependencies] | ||
s2n-tls = { path = "../../extended/s2n-tls" } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,10 @@ default = [] | |
[dependencies] | ||
s2n-tls = { version = "=0.3.9", path = "../../extended/s2n-tls" } | ||
s2n-tls-tokio = { version = "=0.3.9", path = "../../extended/s2n-tls-tokio" } | ||
hyper = { version = "1" } | ||
hyper-util = { version = "0.1", features = ["client-legacy", "tokio", "http1", "http2"] } | ||
# A minimum hyper version of 1.3 is required by hyper-util 0.1.4. | ||
hyper = { version = "1.3" } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
# s2n-tls-hyper depends on hyper-util functionality added in 0.1.4. | ||
hyper-util = { version = "0.1.4", features = ["client-legacy", "tokio", "http1", "http2"] } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hyper-util 0.1.4 is needed because we rely on Connection being implemented for TokioIo, which was implemented in 0.1.4. |
||
tower-service = { version = "0.3" } | ||
http = { version = "1" } | ||
|
||
|
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.
aws-lc-rs 1.6.4 is needed because the DEP_AWS_LC environment variables were not exported before then, and they're needed in order to build s2n-tls-sys.