Giter Site home page Giter Site logo

Cargo features are not additive about rmp3 HOT 4 CLOSED

mgeier avatar mgeier commented on August 15, 2024
Cargo features are not additive

from rmp3.

Comments (4)

0x08088405 avatar 0x08088405 commented on August 15, 2024

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.

from rmp3.

mgeier avatar mgeier commented on August 15, 2024

Should I just add a warning?

I don't know.
Do you mean a warning in the documentation?
Or is there a way to create a warning during the build process?

Would this problem even appear in practice?
Is it realistic that there are multiple dependencies to rmp3 in a project?

from rmp3.

mgeier avatar mgeier commented on August 15, 2024

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 float-output feature.
For this I've added a warning to the docs.

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).
If and when we find a good solution for those non-additive features, I can add them back.

from rmp3.

0x08088405 avatar 0x08088405 commented on August 15, 2024

This is extremely late, but I've released 0.3, a complete rewrite, and I inverted most of the flags where applicable so they can be additive. For float, I also just added a warning and linked the explanation linked here. Not much else you can do.

from rmp3.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.