Split emscripten stuff into its own target and stop relying on cargo web
to download/manage then emscripten toolchain. We can just get it
ourselves. We also now run the emscripten tests.
Signed-off-by: Joe Richey <joerichey@google.com>
- 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>
This feature isn't enabled by rand/rand_core and provides very little
error information that isn't already conveyed through our Error values.
This also simplifies the supported configuration space for getrandom.
We update the docs and CI to match this change.
Don't spin when polling /dev/random. We also remove the use of spin
locks when opening the persistent fd for platforms that require it.
For both these cases, we can just use the pthread lock/unlock methods
in libc. This includes adding Mutex and DropGuard abstractions.
Signed-off-by: Joe Richey <joerichey@google.com>
Right now for each of `util_libc` and `use_file` we have a list of
`target_os` configs to determine if we build the module.
This PR moves these mod declarations into the main `cfg_if` statement
(the one that selects which implementation we use). This way, the mod
statements are kept in-sync with the implementations that use them.
Also, I merged together `target_os` cfgs that have the same
implementation. The downside to this is that the targets are no longer
in alphabetical order.
Also, this is only being applied to `0.2` as the `0.1` cfgs still have
to keep `std` around.
Rename it from freebsd.rs to sysctl_arandom.rs.
NetBSD has been patching rustc for some time to use the FreeBSD
implementation because every single invocation of the compiler
may drain from the entropy pool and cause the next to block.
This can massively inflate build times for rust software, or cause
it to fail entirely, especially in VMs (for example, our Xen package
building cluster).
* 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