- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 459
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
Fix no-std support. #844
Fix no-std support. #844
Conversation
Maybe, as a side note: this issue was not caught by CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, we should not force std
here.
What additional test do you propose? Probably we should have a bare-metal target included here, e.g. thumbv6m-none-eabi
.
Cargo.toml
Outdated
alloc = ["rand_core/alloc"] # enables Vec and Box support (without std) | ||
# re-export optional WASM dependencies to avoid breakage: | ||
wasm-bindgen = ["getrandom_package/wasm-bindgen"] | ||
stdweb = ["getrandom_package/stdweb"] | ||
getrandom = ["getrandom_package", "rand_core/getrandom"] | ||
|
||
# Configuration: | ||
simd_support = ["packed_simd"] # enables SIMD support | ||
simd_support = ["packed_simd", "rand_chacha/simd"] # enables SIMD support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two have very little to do with one another — simd_support
is about generating SIMD types (using unstable machinery from nightly), while rand_chacha/simd
is about enabling SIMD optimisations (without requirements on nightly or packed_simd
).
I think rand_chacha
should not expose this feature and always require simd
on c2-chacha
(and keep a dummy simd
feature for compatibility). (Thus we should bump the version of rand_chacha
first and then depend on it here.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want me to bump rand_chacha
in this PR then, or should I rebase on something you folks do?
`rand_chacha` used `c2-chacha` without trickling through features. This disables default options in `rand_chacha`, enabling simd and std when the option is selected at the root.
Thanks. Looks good but depends on #845. |
BTW please add a note to the changelog, either under |
Done! Let me know if you want something more here. |
No, just waiting for review on #845. |
Right, sorry. Keeping track of many issues and merge requests lately, while we're breaking heat records without A/C. Thanks again! |
Yes, certainly is hot! |
rand_chacha
usedc2-chacha
without trickling through features.This disables default options in
rand_chacha
, enabling simd and stdwhen the option is selected at the root.