You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let env = unsafe{ core::slice::from_raw_parts(env as *constu8, len)};
ifletOk(disable) = core::str::from_utf8(env){
for v in disable.split(" "){
let _ = super::Feature::from_str(v).map(|v| value.unset(v asu32));
}
}
}
do_initialize(value);
value
}
The easier way to address this issue is to make it so the on windows-msvc targets, libc is only used for this feature. The harder way is to use the Windows native equivalent of libc::getenv.
The text was updated successfully, but these errors were encountered:
@ChrisDentongetenv can be replaced with GetEnvironmentVariableA - would you be ok with a hand-coded binding, or would you want windows-rs pulled in so that the binding can be generated?
I'm trying to reduce std's dependency on libc when it isn't actually needed.
Currently std_detect depends on libc for these features:
stdarch/crates/std_detect/Cargo.toml
Lines 37 to 39 in 9814fb0
However, for windows-msvc, the only feature actually using libc in std_detect is
std_detect_env_override
stdarch/crates/std_detect/src/detect/cache.rs
Lines 120 to 137 in 9814fb0
The easier way to address this issue is to make it so the on windows-msvc targets, libc is only used for this feature. The harder way is to use the Windows native equivalent of
libc::getenv
.The text was updated successfully, but these errors were encountered: