-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cargo features are not additive #3
Comments
Yeah, that is indeed an issue. However these features map to non-additive features in minimp3 itself, so I'm not sure if there is a good solution for that. Should I just add a warning? I have thought about compiling multiple instances of minimp3 as a workaround in the past but that would lead to ugly linker errors unless I write a script to substitute function names and definitions, I suppose, but that still wouldn't work with things like NO_SIMD. |
I don't know. Would this problem even appear in practice? |
FYI, I've just published my crate: https://docs.rs/minimp3_ex-sys/0.1.0/ I've removed all features that I don't need myself, leaving only the In the rare case of a feature mismatch this should lead to a hard compilation error. A mismatch in the other features would not easily be noticed be users, so I completely removed them for now (mgeier/minimp3_ex-sys@74e0b27). |
This is extremely late, but I've released |
I've just learned that Rust features are supposed to be additive, see
The features of the
rmp3
crate are not additive.For example, if the
rmp3
crate appears more than once in the dependency tree and one of the instances requests thefloat
feature, it will be activated for all instances, most likely leading to compilation errors.Other features like
no-simd
will probably not lead to compilation errors, but just to very much unexpectedminimp3
build options.I don't have any practical experience with this, is this a problem?
If yes, what is the solution?
I'm asking this because I'm working on similar bindings: https://github.com/mgeier/minimp3_ex-sys.
The text was updated successfully, but these errors were encountered: