wgpu_types/
env.rs

1use alloc::string::String;
2
3/// No-std friendly version of `std::env::var`. Returns `None` if the environment variable is not set
4/// or we are in a no-std context.
5pub fn var(_key: &str) -> Option<String> {
6    #[cfg(feature = "std")]
7    return std::env::var(_key).ok();
8
9    #[cfg(not(feature = "std"))]
10    return None;
11}