-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.rs
More file actions
27 lines (22 loc) · 713 Bytes
/
Copy pathbuild.rs
File metadata and controls
27 lines (22 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
fn main() -> miette::Result<()> {
// Only re-run the build script when build.rs is changed - aka never
println!("cargo:rerun-if-changed=build.rs,.env");
// #[cfg(feature = "defmt")]
// println!("cargo:rustc-link-arg=-Tdefmt.x");
#[cfg(feature = "net")]
println!("cargo:rustc-link-arg=-Trom_functions.x");
dotenv::dotenv().ok();
println!(
"cargo::rustc-env=SSID={}",
std::env::var("SSID").unwrap_or_default()
);
println!(
"cargo::rustc-env=PASSWORD={}",
std::env::var("PASSWORD").unwrap_or_default()
);
println!(
"cargo::rustc-env=CLIENT_ID={}",
std::env::var("CLIENT_ID").unwrap_or_default()
);
Ok(())
}