diff --git a/.github/workflows/ci_rust.yml b/.github/workflows/ci_rust.yml index 4ab5916337f..913ce21af8c 100644 --- a/.github/workflows/ci_rust.yml +++ b/.github/workflows/ci_rust.yml @@ -366,3 +366,38 @@ 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 + + - name: Install cargo-minimal-versions + uses: baptiste0928/cargo-install@v3.3.0 + 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 diff --git a/bindings/rust/extended/s2n-tls-sys/templates/Cargo.template b/bindings/rust/extended/s2n-tls-sys/templates/Cargo.template index 4c3d4b06fc3..7213150777f 100644 --- a/bindings/rust/extended/s2n-tls-sys/templates/Cargo.template +++ b/bindings/rust/extended/s2n-tls-sys/templates/Cargo.template @@ -36,8 +36,8 @@ stacktrace = [] # unstable-foo = [] [dependencies] -aws-lc-rs = { version = "1" } -libc = "0.2" +aws-lc-rs = { version = "1.6.4" } +libc = "0.2.121" [build-dependencies] cc = { version = "1.0.100", features = ["parallel"] } diff --git a/bindings/rust/extended/s2n-tls-tokio/Cargo.toml b/bindings/rust/extended/s2n-tls-tokio/Cargo.toml index 81ed980a584..0be45175c6d 100644 --- a/bindings/rust/extended/s2n-tls-tokio/Cargo.toml +++ b/bindings/rust/extended/s2n-tls-tokio/Cargo.toml @@ -13,7 +13,7 @@ default = [] [dependencies] errno = { version = "0.3" } -libc = { version = "0.2" } +libc = { version = "0.2.121" } pin-project-lite = { version = "0.2" } s2n-tls = { version = "=0.3.9", path = "../s2n-tls" } tokio = { version = "1", features = ["net", "time"] } diff --git a/bindings/rust/extended/s2n-tls/Cargo.toml b/bindings/rust/extended/s2n-tls/Cargo.toml index fa4e66493f2..14a3376a705 100644 --- a/bindings/rust/extended/s2n-tls/Cargo.toml +++ b/bindings/rust/extended/s2n-tls/Cargo.toml @@ -20,7 +20,7 @@ unstable-testing = [] [dependencies] errno = { version = "0.3" } -libc = "0.2" +libc = "0.2.121" s2n-tls-sys = { version = "=0.3.9", path = "../s2n-tls-sys", features = ["internal"] } pin-project-lite = "0.2" hex = "0.4" diff --git a/bindings/rust/standard/bench/Cargo.toml b/bindings/rust/standard/bench/Cargo.toml index bb4d66bb102..becf8218a5e 100644 --- a/bindings/rust/standard/bench/Cargo.toml +++ b/bindings/rust/standard/bench/Cargo.toml @@ -2,6 +2,7 @@ name = "bench" version = "0.1.0" edition = "2021" +publish = false [dependencies] s2n-tls = { path = "../../extended/s2n-tls" } diff --git a/bindings/rust/standard/s2n-tls-hyper/Cargo.toml b/bindings/rust/standard/s2n-tls-hyper/Cargo.toml index f442d12beb6..fb622076caa 100644 --- a/bindings/rust/standard/s2n-tls-hyper/Cargo.toml +++ b/bindings/rust/standard/s2n-tls-hyper/Cargo.toml @@ -14,8 +14,8 @@ 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"] } +hyper = { version = "1.4" } +hyper-util = { version = "0.1.7", features = ["client-legacy", "tokio", "http1", "http2"] } tower-service = { version = "0.3" } http = { version = "1" }