Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Apparently rust and cargo can't check for dependency support for
no_std
, one easy way to test it is to use thethumbv6m-none-eabi
target, which I included now in CI.This helped narrow down what dependencies were actually broken for
no_std
support.generic-bytes had to be removed, because it doesn't have
no_std
support. This wasn't an issue per se, but some of it's functionality had to be replaced with custom functions, back-porting this to opaque-ke 1.0 would be a breaking change I have no clue exactly how to solve.A common bug, see rust-lang/cargo#4866, unified std features from a dev-dependency on normal builds, this was easily rectified by switching to the new feature resolver version.
The new resolver has an MSRV of 1.51, which works fine for this version, but not if we want to backport it to opaque-ke 1.0, which will have to be fixed differently. This isn't an issue that will affect consumers of this library, it's only an issue for us during testing.
For WASM, I think there was some misconception around the
getrandom
crate andno_std
support. If you wanna useno_std
with WASM, you can't use wasm-bindgen, which I believe requires std support. So to support forno_std
, a user will have to provide their own implementation to be passed into functions.I also added testing to automatically activate the "std" crate feature.
Additionally any calls to
typenum::Unsigned::to_usize()
were replaced withtypenum::Unsigned::USIZE
.