Skip to content

Conversation

@sjmackenzie
Copy link
Contributor

@sjmackenzie sjmackenzie commented Nov 27, 2021

Later once hermit supports aarch64 rng I'll make a patch to support it.

For more context see #199

Copy link
Member

@newpavlov newpavlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I would prefer a proper buffer-based API, but I guess this code should be a fine stop-gap solution.

I will leave this PR open for some time in the case if @josephlr has any concerns.

Meanwhile can you please add an [UNRELEASED] section to the changelog with an entry containing description of this PR? Also it would be nice to add a Hermit build test to the CI workflow.

@sjmackenzie
Copy link
Contributor Author

sjmackenzie commented Nov 30, 2021

Agreed on the buffer-based API, I suggest this is good feedback for @stlankes & @josephlr!

I believe getrandom CI already has hermit workflow support, correct me if I'm wrong please:

run: cargo build -Z build-std=core --features=rdrand --target=x86_64-unknown-hermit

Ideally I'd love to try get this stop-gap merged relatively soon as there are a number of transitive dependencies I need to lobby to bump to a hermit-supported-getrandom. I'm choosing hermit as the sole target platform for an existing project.

@josephlr I'd love your feedback on this stop-gap solution.

@newpavlov I pushed the requested changes, if you could be so kind and review them.

Thanks!

@sjmackenzie
Copy link
Contributor Author

By buffer-based API do you mean you can pass in an arbitrary sized u8 buffer and it'd be filled accordingly? If so, this is what is happening in this PR.

@newpavlov
Copy link
Member

By buffer-based API do you mean you can pass in an arbitrary sized u8 buffer and it'd be filled accordingly? If so, this is what is happening in this PR.

I meant a "syscall" on the Hermit side, like requested in hermit-os/kernel#143

I believe getrandom CI already has hermit workflow support, correct me if I'm wrong please:

Ah, I forgot about that. You can simply remove the --features=rdrand part then since it's not longer needed.

@newpavlov newpavlov merged commit ec445bb into rust-random:master Dec 7, 2021
@sjmackenzie
Copy link
Contributor Author

Thanks for removing the --features=rdrand, it fell on the wayside. Appreciate the merge!

@sjmackenzie sjmackenzie deleted the hermit-target branch December 13, 2021 07:18
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