* Add `getrandom_uninit(dest: &mut [MaybeUninit<u8>]) -> ...`.
Add a public API for filling an `&mut [MaybeUninit<u8>]`. This will primarily
serve as the building block for more typeful APIs for constructing random
arrays.
Increase the MSRV to 1.36, as `MaybeUninit` was added in that release.
Fixes#226.
* Revert testing changes
Signed-off-by: Joe Richey <joerichey@google.com>
* Allow rdrand tests to work with new implementation
Signed-off-by: Joe Richey <joerichey@google.com>
* Add Additional benchmarks and buffer size
Signed-off-by: Joe Richey <joerichey@google.com>
* Use pointer casts instead of transmute
Signed-off-by: Joe Richey <joerichey@google.com>
* Avoid initializing the buffer in `getrandom_uninit` benchmarks.
* Benchmarks: Consume the result in `black_box`.
Signed-off-by: Joe Richey <joerichey@google.com>
Co-authored-by: Joe Richey <joerichey@google.com>
See #194
This uses the fact that `wasm32-unknown-unknown` is an "unsupported" target. This means we can use the `"custom"` feature to define a custom handler, and then write tests to make sure that function is called.
- Cleanup .travis.yml
- Loops over std/no_std targets
- Remove deprecated/useless keys
- No more `cd`, we just use `--package`.
- Improve tests
- Main `getrandom` tests are now unit test modules instead of
integration tests, making the code cleaner.
- The custom RNG crates now use this common module as part of their
integration tests.
- No more weird test-only features needed to get the crate to build.
Signed-off-by: Joe Richey <joerichey@google.com>
* Simplify CI process for WASM
Run WASI tests, and run both stdweb/wasm-bindgen on both node and in browsers
These changes also remove the need for a separate tests/wasm_bindgen
* Use all pre-built binaries in the CI
* Fix Cargo.toml typo
Co-Authored-By: Artyom Pavlov <newpavlov@gmail.com>
* Fix install location
* Debug CI