-
Notifications
You must be signed in to change notification settings - Fork 203
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
Add opt_in
crate feature
#580
Conversation
I think it would make more sense to call this feature I also don't see much point in |
I think the ideal situation would be to get @dhardy's idea in #433 (comment) to work somehow. That way an external crate (say use getrandom::{register_backend, Error};
register_backend!("js", web_crypto_fill);
unsafe extern "C" fn web_crypto_fill(ptr: *mut u8, len: size) -> Option<Error> {
// ...
} And then passing |
@josephlr: I don't think |
The @josephlr As I wrote here, one alternative approach is to move WASM JS implementation into a separate crate and rely on the custom backend. |
Using a separate feature flag for each backend (or group of backends for some target platform) makes more sense IMO, so e.g. Unless your intention is that |
What about the
Yes, it's exactly my intention.
Hm, I don't see why it would be a problem. IIUC UPD: I updated the code and, as you can see, CI passes without any lint warnings. |
Closing in favor of #574. |
This feature resolves the lock file bloat issue at the cost of less ergonomic use of opt-in backends.
TODO: update docs