fn main() {
println!("cargo:rerun-if-env-changed=RUSTFLAGS");
let rustflags = std::env::var("RUSTFLAGS").unwrap_or_default();
if !rustflags.contains("compio_dns") {
for line in r#"
⚠️ compio_dns is NOT enabled!
To integrate into compio ecosystem, you must set `compio_dns` cfg.
Example (Bash):
export RUSTFLAGS="--cfg compio_dns $RUSTFLAGS"
Example (mise.toml):
[env]
RUSTFLAGS = "--cfg compio_dns {{ env.RUSTFLAGS }}"
⚠️ compio_dns 未启用!
若要整合到 compio 生态,必须设置 `compio_dns` cfg。
示例 (Bash):
export RUSTFLAGS="--cfg compio_dns $RUSTFLAGS"
"#
.trim()
.lines()
{
println!("cargo:warning={}", line);
}
}
}