rustdependenciesrust-cargocargo-features

How can I set feature flags of a transitive dependency?


Suppose I want to install the following dependency in my project:

[dependencies]
multi-party-ecdsa = { git = "https://github.com/ZenGo-X/multi-party-ecdsa.git", rev = "3e711c792db06aaeeac5694b137d24f7551069d1"}

which builds it with cargo build command. I would like this instead: cargo build --no-default-features --features curv-kzen/num-bigint. Is it possible without doing it manually?


Solution

  • [dependencies]
    multi-party-ecdsa = { git = "https://github.com/zengo-x/multi-party-ecdsa.git", rev = "3e711c792db06aaeeac5694b137d24f7551069d1", default-features = false }
    curv-kzen = { version = "*", default-features = false, features = ["num-bigint"] }
    

    This should work.