-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature-gating /dev/random fallback for Linux, Android and Solaris? #5
Comments
Isn't this just going to cause a support headache for any software deployed on old systems without I also don't see much motive for this; it removes only a tiny amount of code and since we do check that |
How about adding disabled-by-default |
That's an interesting proposal. One drawback is that any crate which enables that feature forces it on in the build, which means that libraries shouldn't do this, and only the final binary should enable the feature — though this will often not depend directly on the This is just another case where Cargo features aren't a good fit. I'd rather this was not included for now, though am happy to discuss further. |
I think it's the same story as with WASM features: they should be enabled only by end applications and not by library crates. Yes, arguably it's not the best tool for the job, but it's the best we currently have. It's not an urgent matter, so I guess we can postpone this issue for the time being. |
An environment variable or some type of global config would be a better fit. For the Apparently the Cargo team are revising how features work, so it makes sense to hold off on this for now. |
@newpavlov what was the motivation for this? As long as we are read a byte from |
Mostly minimalism of the implementation, and as a consequence smaller resource usage, incl. binary size. (yeah, it's not really much, but stuff like that tends to add up) |
Are there a significant class of users who would actually make use of it? Possibly for in-distro use? If there are is a large base of users who would actually benefit (slightly), then fine, but mostly this appears to be over-optimisation (the cost exceeding the benefit). |
Looks like pushing the minimum supported version of Linux kernel to 3.17 will not happen anytime soon, so we can close this issue. |
Currently the listed targets fall back to reading
/dev/random
ifgetrandom
syscall is not present. Maybe it's worth to feature-gate it? (i.e. by default only syscall will be used)The text was updated successfully, but these errors were encountered: