Skip to content

Switch rand_os to use fuchsia-cprng crate in rand-0.6 #706

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

Merged
merged 1 commit into from
Jan 25, 2019

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Jan 24, 2019

The fuchsia team has spun out a new crate, fuchsia-cprng, which reduces your exposure to changes in our syscalls, which are still not stable. This crate just exposes the CPRNG syscall, which we do not expect to change.

Also note, the underlying syscall, zx_cprng_draw no longer needs the loop. Instead, we guarantee that the buffer always be filled with randomness.

If this patch is accepted, would it be possible to get a release of rand_os? We also have some dependencies that are using 0.3, 0.4, and 0.5, so would you also be interested in patches for those versions as well?

Thanks!

The fuchsia team has spun out a new crate,
[fuchsia-cprng](https://crates.io/crates/fuchsia-cprng), which reduces
your exposure to changes in our syscalls, which are still not stable.
This crate just exposes the CPRNG syscall, which we do not expect to
change.

Also note, the underlying syscall,
[zx_cprng_draw](https://fuchsia.googlesource.com/zircon/+/HEAD/docs/syscalls/cprng_draw.md)
no longer needs the loop. Instead, we guarantee that the buffer always
be filled with randomness.
erickt added a commit to erickt/rand that referenced this pull request Jan 24, 2019
As in rust-random#706, fuchsia is replacing users of fuchsia-zircon with
fuchsia-cprng since that reduces exposure to our changing syscalls.
erickt added a commit to erickt/rand that referenced this pull request Jan 24, 2019
As in rust-random#706, fuchsia is replacing users of fuchsia-zircon with
fuchsia-cprng, since that reduces exposure to our changing
syscalls.

If this is accepted, could a new version be cut?
@erickt erickt changed the title Switch rand_os to use fuchsia-cprng crate Switch rand_os to use fuchsia-cprng crate in rand-0.6 Jan 25, 2019
@erickt
Copy link
Contributor Author

erickt commented Jan 25, 2019

I think the travis failure is unrelated to this PR. I poked around, and it looks like it's unrelated broken doc links. I filed #710 to track it.

@dhardy
Copy link
Member

dhardy commented Jan 25, 2019

Okay, nice!

Why do you still have users on such old versions of Rand?

  • 0.3 has a shim to build around 0.4
  • 0.4 has seen some backports since it is the last version before we started making big changes (including adding rand_core); I won't say no to more backports but would prefer users to upgrade
  • 0.5 should be easy to upgrade to 0.6; we could in theory add a compatibility shim but haven't

@dhardy dhardy merged commit c864540 into rust-random:master Jan 25, 2019
@erickt
Copy link
Contributor Author

erickt commented Jan 25, 2019

Thanks @dhardy!

Unfortunately we have a bunch of dependencies that are still using the older versions:

On 0.3:

On 0.4:

  • rouille 2.2.0
  • tempdir 0.3.7

On 0.5:

  • futures-util-preview 0.3.0-alpha.12
  • num 0.2.0
  • parking-lot 0.3.1
  • proptest 0.8.7
  • uuid 0.7.1

It just takes time for us to get upstream packages to update, then get their dependents to update, and etc.

erickt added a commit to erickt/rand that referenced this pull request Jan 25, 2019
As in rust-random#706, fuchsia is replacing users of fuchsia-zircon with
fuchsia-cprng since that reduces exposure to our changing syscalls.
erickt added a commit to erickt/rand that referenced this pull request Jan 25, 2019
As in rust-random#706, fuchsia is replacing users of fuchsia-zircon with
fuchsia-cprng, since that reduces exposure to our changing
syscalls.

If this is accepted, could a new version be cut?
erickt added a commit to erickt/rand that referenced this pull request Jan 28, 2019
I missed that rand got refactored, and the fuchsia update
in rust-random#706 should have triggered a release for rand_os, not
rand.
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 this pull request may close these issues.

2 participants