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
The 'libc::syscall' function uses varargs - as a result, its arguments
are completely untyped. THe user must ensure that it is called with the
proper types for the targeted syscall - otherwise, the calling
convention might cause arguments to be put into the wrong registers.
This commit explicitly casts the arguments to 'libc::syscall' to the
proper type for the 'getrandom' syscall. This ensures that the correct
types for the target platform will always be used, instead of relying on
the types used happening to match those required by the target platform.