Skip to content

Conversation

@cyphar
Copy link
Owner

@cyphar cyphar commented Jan 22, 2026

Commit ba50ccd ("capi: use rustversion for symver") expanded the
usage of .symver on architectures where global_asm! was stabilised after
our MSRV to try to maximise our use of symbol versions.

Unfortunately, the way that this was written actually caused us to
disable symbol versions on all Rust versions post-1.72 (the first Rust
version we enabled this support for).

The solution is to swap the order so that #[rustversion::since] is the
attribute being applied rather than #[cfg(target_arch = "...")] (which
cannot be true more than once). While we're at it, add a CI test for
this so we don't break it again in the future by accident.

Fixes #318
Fixes: ba50ccd ("capi: use rustversion for symver")
Signed-off-by: Aleksa Sarai cyphar@cyphar.com

@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cyphar cyphar force-pushed the symbol-versioning branch 7 times, most recently from 3b0115d to 220578c Compare January 22, 2026 19:08
Commit ba50ccd ("capi: use rustversion for symver") expanded the
usage of .symver on architectures where global_asm! was stabilised after
our MSRV to try to maximise our use of symbol versions.

Unfortunately, the way that this was written actually caused us to
disable symbol versions on all Rust versions post-1.72 (the first Rust
version we enabled this support for).

The solution is to swap the order so that #[rustversion::since] is the
attribute being applied rather than #[cfg(target_arch = "...")] (which
cannot be true more than once). While we're at it, add a CI test for
this so we don't break it again in the future by accident.

Fixes: ba50ccd ("capi: use rustversion for symver")
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
@cyphar cyphar force-pushed the symbol-versioning branch from 220578c to 192ad29 Compare January 22, 2026 19:15
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.

did we lose symbol versioning in the past few months?

2 participants