mirror of
https://github.com/DefectingCat/candy
synced 2025-07-15 16:51:34 +00:00
chore(build): add build.rs
This commit is contained in:
19
build.rs
Normal file
19
build.rs
Normal file
@ -0,0 +1,19 @@
|
||||
macro_rules! warn {
|
||||
($($tokens: tt)*) => {
|
||||
println!("cargo:warning={}", format!($($tokens)*))
|
||||
}
|
||||
}
|
||||
|
||||
/// Set environment varibles for build.rs
|
||||
/// set_env!(NAME=xfy);
|
||||
macro_rules! set_env {
|
||||
($($tokens: tt)*) => {
|
||||
println!("cargo:rustc-env={}", format!($($tokens)*))
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
set_env!("NAME=xfy");
|
||||
warn!("hello world");
|
||||
println!("cargo:info=test");
|
||||
}
|
Reference in New Issue
Block a user