例如,我定义了2个没有依赖项的功能:
[features]
default = []
py2 = []
py3 = []
Run Code Online (Sandbox Code Playgroud)
基于所选的功能(--features py3
)我想为依赖项(cpython
)启用不同的功能:
[dependencies.cpython]
default-features = false
# features = ["python27-sys"] I want to select this if py2 is enabled
features = ["python3-sys"]
optional = true
Run Code Online (Sandbox Code Playgroud)
我可以这样做吗?或者我也可以从命令行中为依赖项选择功能吗?
[features]
default = []
py2 = ["cpython", "cpython/python27-sys"]
py3 = ["cpython", "cpython/python3-sys"]
unstable = []
[dependencies.cpython]
# git = "https://github.com/dgrunwald/rust-cpython.git"
default-features = false
optional = true
Run Code Online (Sandbox Code Playgroud)
我在文档或官方网页上看不到任何相关内容.
归档时间: |
|
查看次数: |
393 次 |
最近记录: |