Frowading feature set to dependent Crates


H there:
I recently added some profiling to my library using Flame, great tool there.
The problem arises when I want to hide the instrumentation by using an optional feature:
my Crate.toml looks then like:

flame = { version = "^0.1.9", optional = true }
flamer = { version = "^0.1.4", optional = true }
inner_lib = { path = "inner_lib" }

default = []
profile = ["flame", "flamer"]

When I want to profile the inner_lib crate, I just write:
inner_lib = [ path = "inner_lib", features=["profile"] }

But now the inner lib is compiled with profile instrumentation even when the outer is not using it, and I do not want to pay the price in a library which is meant to be the backend of my computations.

Is it there any way to forward the feature only when I need it?



profile = ["flame", "flamer", "inner_lib/profile"]