Re-export Dependency Features


Is it possible to ‘re-export’ a dependency feature in your crate so usrs can set the feature on that dependency?

So something like:

Crate A:

Feat = []

Crate B:

Feat = [ "A.Feat"]

A = "*"

So a user of B could set Feat on A.


Assuming that a has a feature feat-a, and b has a (normally default) feature feat-b.

default = ["feat-b"]
feat-a = "a/feat-a"
feat-b = "b/feat-b"

a = "0.1.0"
b = { version = "0.1.0", default-features = false }

Of course, you should also be able to do this from the command line, with something like --features=a/feat-a.