-
Notifications
You must be signed in to change notification settings - Fork 220
Closed
Description
Currently the Window 10 and newer code using ProcessPrng
is always chosen on Rust 1.77 and lower, because target_vendor = "win7" was only introduced with Rust 1.78. As the ProcessPrng
API does not exist on Windows 7, programs just refuse to start.
Code in backend.rs:
} else if #[cfg(all(windows, target_vendor = "win7"))] {
mod windows7;
pub use windows7::*;
} else if #[cfg(windows)] {
mod windows;
pub use windows::*;
Would it be possible to either always use the safe Windows 7 code on older Rust versions (1.77 and lower) or change the code to automatically detect if ProcessPrng
is available using e.g. GetProcAddress, so the best API is chosen depending on what is available? All older Rust versions support Windows 7 by default, so it seems wrong to statically depend on a Windows 10 API with no way to disable this dependency.
Metadata
Metadata
Assignees
Labels
No labels