Add version_suffix_components setting #352
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #345 (this patch is based on my comment there) and rustls/rustls-ffi/pull/274.
This adds a setting to disable automatic semver SONAMEs and to pick an arbitrary number of components from the version string for the SONAME.
This feature allows two additional use-cases for library developers to pick from:
.so.0
,.so.1
,.so.2
, ...For a C-style breaking-change counter use a config like this:
Increase the major version for every time the ABI is broken:
This pattern is already supported, but one has to start at
.so.1
because it's currently not possible to configure.so.0
.Doing this does not interfer with pkg-config metadata:
Opt-out of a stable ABI
To read the version from
[package.version]
but opt-out of a stable ABI:"Why not do static linking at this point?" - doing it like this has 3 effects:
Another way of opting out of a stable ABI is "use 0.1.0 and only ever bump the minor version". cargo-c default settings would then make sure every release is in it's own
libfoo.so.0.1
,libfoo.so.0.2
SONAME namespace, until comfortable with making ABI compatible0.X.{patch}
releases that still provide the first two effects, but do not require a rebuild of consuming executables.I originally named this setting
suffix_components
but I'm indecisive which name is better.As far as I can tell this is the last feature needed to close #345 as completed.
cc: @lu-zero @cpu @kornelski @kyrias