【发布时间】:2023-01-30 10:02:45
【问题描述】:
我试图找出是否可以使用 configurable-env Cargo 功能来设置特定于特定配置文件的环境变量。
# Instead of global version:
# [env]
# FOO_QTY = "10"
# Something similar to the following(pseudocode):
[profile.test.env]
FOO_QTY = "2"
[profile.release.env]
FOO_QTY = "1000"
【问题讨论】:
-
也许
[target.'cfg(debug_assertions)'.env]?编辑:没关系,apparently "There is currently no way to add dependencies based on these configuration values."
标签: rust rust-cargo