admin管理员组文章数量:1241128
I am stuck with the following problem. I have a workspace containing several crates anized like this:
Top level Cargo.toml
:
[workspace]
members = [
"molar",
"molar_python",
...
...
]
The crate molar
has a feature gromacs
, which turns on conditional compilation in several places and activates another dependency.
molar/Cargo.toml
:
[features]
gromacs = ["dep:molar_gromacs"]
Now, when I'm compiling molar_python
, which depends on molar
, I want to propagate gromacs
feature down to molar
like this:
molar_python/Cargo.toml
:
[dependencies]
molar = {version = "0.8.0", path = "../molar", default-features = false}
...
[features]
gromacs = ["molar/gromacs"]
The idea is that when I do cargo build -p molar_python --features=gromacs
the feature is propagated to molar
crate and switches on the same feature there. At least it should work like this according to the manual.
However, it doesn't work at all. Whatever I do I can't activate gromacs
feature in molar
crate indirectly from molar_python
. The only way is to explicitly switch it on in the crate itself.
Am I missing something obvious? What is the correct way of doing this?
This happens in my molar crate.
本文标签: rustPropagating features in workspace doesn39t workStack Overflow
版权声明:本文标题:rust - Propagating features in workspace doesn't work - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740059988a2222557.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论