Skip to content
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

Tracking issue for 0.2.0 #98

Closed
8 of 9 tasks
josephlr opened this issue Aug 25, 2019 · 14 comments · Fixed by #162
Closed
8 of 9 tasks

Tracking issue for 0.2.0 #98

josephlr opened this issue Aug 25, 2019 · 14 comments · Fixed by #162
Milestone

Comments

@josephlr
Copy link
Member

josephlr commented Aug 25, 2019

In the process of addressing #94, we realized that some of the changes we want to do would require breaking backwards compatibility. If we are going to release a version 0.2, we should consider other changes to getrandom.

A potential list is below. @dhardy and @newpavlov feel free to edit this to include your own ideas.

If you have suggestions, please comment!

@josephlr josephlr added this to the 0.2 milestone Aug 25, 2019
@newpavlov
Copy link
Member

newpavlov commented Aug 25, 2019

Unfortunately we probably still can't use compilation error by default for wasm32-unknown-unknown, since it would require bumping rand/rand_core versions (i.e. breaking change leaks downstream in this case).

I like the idea of replacing support for hermit, l4re, and uefi with rdrand flag, but I am bit unsure about implications for rand, since again strictly speaking it can be considered a breaking change. :/

wasm-bindgen -> bindgen, would make it much easier to use js_sys or web_sys.

I am still not sure why would we want to use web_sys instead of wasm-bindgen directly.

@josephlr
Copy link
Member Author

Unfortunately we probably still can't use compilation error by default for wasm32-unknown-unknown, since it would require bumping rand/rand_core versions (i.e. breaking change leaks downstream in this case).

Hmm, that would be true. We could consider dividing the issues into "things that would require rand 0.8" and "things we could make work with rand 0.7".

I like the idea of replacing support for hermit, l4re, and uefi with rdrand flag, but I am bit unsure about implications for rand, since again strictly speaking it can be considered a breaking change. :/

I mean we could always cop out and say those platforms weren't officially supported by rand yet and so it's not a breaking change (as all of these are new-ish targets, it might be fine).

wasm-bindgen -> bindgen, would make it much easier to use js_sys or web_sys.

I am still not sure why would we want to use web_sys instead of wasm-bindgen directly.

A fair point, I guess what I meant here is that if we want to do something like this, we should rename the feature. I'll try to see if the code would be any better using js_sys. I think this would be easier to talk about with actual code.

@dhardy
Copy link
Member

dhardy commented Aug 25, 2019

(i.e. breaking change leaks downstream in this case)

We could use a feature-flag to re-enable (perhaps dummy-wasm32-unknown). But I don't recall any reason we shouldn't keep this behaviour as the default for wasm32-unknown-unknown; as @newpavlov has said a couple of times it's a not-quite-standardised target that can hopefully be dropped at some point.

Custom Randomness (#4)

IMO this is not an urgent issue (at least, I've seen very little demand for it). There is already a safe alternative: a Cargo patch to replace the crate.

Feature for CPU randomness (#84)

There are multiple aspects to this:

  • Does it do anything on targets with good alternative sources?
  • If so, does it replace that source or does it get used as a fallback (where failure is possible)?
  • Do we, as suggested, drop support for targets like UEFI and SGX where CPU randomness is our only option anyway?

@josephlr
Copy link
Member Author

I've created a 0.2 branch to track breaking changes to getrandom. PRs that make breaking changes should be submitted/merged against that branch.

@newpavlov
Copy link
Member

newpavlov commented Oct 28, 2019

Maybe we also should remove the log feature? IIRC it was mostly useful for WASM backends and I haven't seen anyone to enable this feature directly and it's not cascaded from the rand crates.

@CryZe
Copy link

CryZe commented Nov 19, 2019

Both cargo and the wasm target are still way too broken to remove the dummy implementation for rand / getrandom's wasm32-unknown-unknown support.

@josephlr
Copy link
Member Author

josephlr commented Jan 6, 2020

Both cargo and the wasm target are still way too broken to remove the dummy implementation for rand / getrandom's wasm32-unknown-unknown support.

@CryZe what do you mean? Our plan (see #109) is to give users of rand/getrandom a way to set a custom RNG source (similar to how Custom Allocators work) on unsupported targets (which would include wasm32-unknown-unknown). Is there a reason that wouldn't work for your use-case?

Having the dummy impl makes debugging issues very hard, as the dummy impl fails at runtime as opposed to compile time.

@CryZe
Copy link

CryZe commented Jan 6, 2020

Ah, I think that would work then.

@josephlr
Copy link
Member Author

josephlr commented Jan 6, 2020

@newpavlov I think dropping the log feature is also a good idea. We should focus on getting any relevant error info into the Error structure itself.

@newpavlov
Copy link
Member

@josephlr
Maybe it's worth to update the OP list?

@josephlr
Copy link
Member Author

@newpavlov @dhardy I updated the list. I think we can release 0.2 after #136 and #135 are reviewed an merged.

@vks
Copy link

vks commented Jul 1, 2020

I think we should consider bumping MSRV to 1.36, see rust-random/rand#987.

@newpavlov
Copy link
Member

getrandom is not dependent on alloc, so there is no reason to bump MSRV to 1.36 (but I would prefer if rand v0.8 and rand-distr v0.3 had MSRV equal to 1.36). I don't think we have to keep MSRV synchronized across all rand crates.

@Lokathor
Copy link

Increasing from 1.33 to 1.34 is entirely reasonable, since that's current Debian Stable.

This was referenced Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants