Skip to content

Bump version to v5, allow v5 use v4-sys#407

Draft
kornelski wants to merge 1 commit into
masterfrom
v5-with-v4-sys
Draft

Bump version to v5, allow v5 use v4-sys#407
kornelski wants to merge 1 commit into
masterfrom
v5-with-v4-sys

Conversation

@kornelski

Copy link
Copy Markdown
Collaborator

When #406 is released, this will be backwards-compatible with projects using boring-sys v4.

This will be crucial for users of boring, because boring v4 and v5 can co-exist in the dependency tree (it's merely a bloat), but boring-sys v4 and v5 can't (due to linking C having globals all over the place). boring v5 with boring-sys v4 will let projects upgrade their dependencies gradually.

@kornelski

Copy link
Copy Markdown
Collaborator Author

@Lekensteyn

@nox

nox commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

We actually need an update of BoringsSSL itself in boring-sys, which I think makes this irrelevant?

@kornelski

kornelski commented Nov 23, 2025

Copy link
Copy Markdown
Collaborator Author

Irrelevant in what sense?

You haven't released v5 to crates.io yet, so I don't think anybody has experienced yet the pain I'm trying to prevent here.

@nox

nox commented Nov 24, 2025

Copy link
Copy Markdown
Contributor

boring 5 can't work with boring-sys 4 if it uses new APIs that are only present in boring-sys 5.

@kornelski

kornelski commented Dec 1, 2025

Copy link
Copy Markdown
Collaborator Author

I've ran the tests on v5 with boring-sys v4, and it seems to be fine? (apart from minor tweaks that were fixed here: #406)

@nox

nox commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

Because AFAIK we haven't bumped BoringSSL in boring-sys yet.

@rushilmehra

Copy link
Copy Markdown
Collaborator

Do you have an example of one of the new APIs?

@nox

nox commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

As an example, the BoringSSL bump I'm working on needs changes to boring-pq.patch, and it now includes a new function SSL_use_second_keyshare.

@rushilmehra

Copy link
Copy Markdown
Collaborator

Yeah I see what you mean. This might be overkill but could we make a build.rs to feature flag APIs based on crate version? Alternatively, would solving #197 also solve this problem?

@rushilmehra

Copy link
Copy Markdown
Collaborator

I think it will. If you can wait until the weekend I'll put up a PR

@nox

nox commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

#197 breaks FIPS.

@nox

nox commented Dec 5, 2025 via email

Copy link
Copy Markdown
Contributor

@kornelski

Copy link
Copy Markdown
Collaborator Author

Extra functions can be made to work.

v4 sys crate can contain dummy definitions of future functions to avoid compilation errors.

or new functionality in v5 that calls new functions can be behind a feature flag. It will work if the flag isn't enabled.

@kornelski

Copy link
Copy Markdown
Collaborator Author

Yeah, we could make it flexible in the other direction instead.

@kornelski

kornelski commented Dec 10, 2025

Copy link
Copy Markdown
Collaborator Author

Making it compatible in the other direction is complicated by removal of Cargo features from the sys crate:

package boring depends on boring-sys with feature fips-link-precompiled but boring-sys does not have that feature.

it requires re-adding at least dummy feature flags: #410

@kornelski kornelski changed the title Bump version to v5 Bump version to v5, allow v5 use v4-sys Jan 20, 2026
@kornelski kornelski marked this pull request as draft January 20, 2026 15:52
@kornelski

Copy link
Copy Markdown
Collaborator Author

#442

@kornelski kornelski force-pushed the v5-with-v4-sys branch 4 times, most recently from abf77a9 to 903fe70 Compare January 26, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants