Skip to content

Commit 4f6edb5

Browse files
committed
Let crates detect boring-sys version
1 parent 3921f35 commit 4f6edb5

4 files changed

Lines changed: 17 additions & 5 deletions

File tree

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ members = [
88
resolver = "2"
99

1010
[workspace.package]
11-
version = "5.1.0"
11+
version = "5.2.0"
1212
rust-version = "1.85"
1313
repository = "https://github.com/cloudflare/boring"
1414
edition = "2021"
@@ -20,9 +20,9 @@ tag-prefix = ""
2020
publish = false
2121

2222
[workspace.dependencies]
23-
boring-sys = { version = "5.1.0", path = "./boring-sys", default-features = false }
24-
boring = { version = "5.1.0", path = "./boring", default-features = false }
25-
tokio-boring = { version = "5.1.0", path = "./tokio-boring", default-features = false }
23+
boring-sys = { version = "5.2.0", path = "./boring-sys", default-features = false }
24+
boring = { version = "5.2.0", path = "./boring", default-features = false }
25+
tokio-boring = { version = "5.2.0", path = "./tokio-boring", default-features = false }
2626

2727
bindgen = { version = "0.72.0", default-features = false, features = ["runtime"] }
2828
bitflags = "2.9"

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ and [Raw Public Key](https://docs.rs/boring/latest/boring/ssl/struct.SslRef.html
1919

2020
# Upgrading from `boring` v4
2121

22-
* First update to boring 4.21 and ensure it builds without any deprecation warnings.
22+
* First update to boring 4.22 and ensure it builds without any deprecation warnings.
2323
* `pq-experimental` Cargo feature is no longer needed. Post-quantum crypto is enabled by default.
2424
* `fips-precompiled` Cargo feature has been merged into `fips`. Set `BORING_BSSL_FIPS_PATH` env var to use a precompiled library.
2525
* `fips-compat` Cargo feature has been renamed to `legacy-compat-deprecated` (4cb7e260a85b7)
@@ -30,6 +30,8 @@ and [Raw Public Key](https://docs.rs/boring/latest/boring/ssl/struct.SslRef.html
3030
* `X509StoreBuilder::add_cert` takes a reference.
3131
* `hyper` 0.x support has been removed. Use `hyper` 1.x.
3232

33+
To support both v4 and v5, add `boring = ">=4.22,<6"` to `Cargo.toml`. If you need to auto-detect the version selected, add `boring-sys = ">=4.22,<6"` as a direct dependency, and in your `build.rs` check if `DEP_BORINGSSL_VERSION_MAJOR` env var is set to `5`. Versions older than 5.2.0 don't set it.
34+
3335
## Contribution
3436

3537
Unless you explicitly state otherwise, any contribution intentionally

RELEASE_NOTES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
5.2.0
2+
- 2026-05-21 Export `DEP_BORINGSSL_VERSION_MAJOR` var
3+
- 2026-04-27 Expose DTLS version constants in SslVersion
4+
15
5.1.0
26
- 2026-04-13 Add EVP_AEAD-based detached AEAD module
37
- 2026-04-13 Add generic PKey private key generation API

boring-sys/build/config.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ impl Config {
7171
.as_ref()
7272
.is_some_and(|path| path.join("src").exists());
7373

74+
// DEP_BORINGSSL_VERSION_MAJOR
75+
println!(
76+
"cargo:version_major={}",
77+
env::var("CARGO_PKG_VERSION_MAJOR").unwrap_or_default()
78+
);
79+
7480
let config = Self {
7581
manifest_dir,
7682
out_dir,

0 commit comments

Comments
 (0)