Open DarthGandalf opened 5 years ago
It might be possible to read Cargo.toml
features section and add them to the template crate run by cargo aoc
.
Yeah, that's not what I meant though. I'm using that workaround already.
When the generated crate uses my crate as a dependency, cargo reads the defaults
section of my Cargo.toml
just fine. But that requires me to change the defaults
section every time, which is not the intended purpose of it.
What I want is to run cargo aoc --features foo
without changing my Cargo.toml, then cargo-aoc doesn't need to parse Cargo.toml at all, but only parse its own command line arguments.
I want to add visualisation, but I don't want it every time, because it slows things down, so I want something like
cargo aoc --features video
which would enablevideo
:Two workarounds which I see now, is to change
default
back and forth inCargo.toml
:or to decide it in runtime based on some environment variable.