Closed Shatur closed 2 years ago
This could be done by making bin deps default opt-in, and then you'll depend on svd2rust with svd2rust = {version = "*", default-features = false}
e.g
New feature bin
that pulls in clap and everything else we're using in the svd2rust binary. This feature is enabled by default
this just has to be implemented, feel free to make a pr!
New feature bin that pulls in clap and everything else we're using in the svd2rust binary. This feature is enabled by default
But what main.rs will represent without bin
dependencies? The command cargo build --no-default-features
will produce a binary since main.rs
is present. More idiomatic would use workspace and two crates - library and executable.
I don't see the issue, binary packages can specify required-features
Oh, got it, will send a PR then.
When working with FPGA I use this crate as a build dependency library to generate code (because my FPGA configuration changes). But this also means that I have to pull some extra deps, such as
clap
. I would like to request to separate executable and generation library.