Commit Graph

148 Commits

Author SHA1 Message Date
Joe Richey 54b4c8d1b6 travis: Allow nightly builds to fail 2020-04-27 02:15:05 -07:00
Joe Richey b44da72a01 travis: Fix wasm32 CI
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>
2020-04-27 02:15:05 -07:00
Artyom Pavlov 33b859bae1 Prepare release v0.1.14 (#128) 2020-01-07 12:05:23 +00:00
Joe Richey c5e2025d2c util: Remove unused spin-lock interfaces
We no longer use spin-locks anywhere in getrandom, so remove any
interfaces which spin.

Signed-off-by: Joe Richey <joerichey@google.com>
2020-01-07 11:06:56 +00:00
Joe Richey 46963aac74 use_file: Remove use of spin-locks
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>
2020-01-07 11:06:56 +00:00
Joe Richey 245b5b2121 util_libc: open_readonly shoud return a Result
Signed-off-by: Joe Richey <joerichey@google.com>
2020-01-07 11:06:56 +00:00
Joseph Richey a913c9c673 dragonfly: Don't try to read errno value (#129) 2020-01-07 03:54:43 +00:00
Joseph Richey 48781cd9ec wasi: Update and Fix Travis failures (#126) 2020-01-05 20:59:50 +00:00
Artyom Pavlov d661aa7e1b Prepare release v0.1.13 (#118) 2019-10-25 12:25:33 +00:00
Joseph Richey 81bd43e5d6 Fix typos and bad doc links. (#117) 2019-10-24 02:06:53 -07:00
Artyom Pavlov 9a385f1923 Add VxWorks support (#86) 2019-10-23 09:35:50 +00:00
nia 2fa1bbac80 Switch to using the arandom sysctl on NetBSD (same as FreeBSD). (#115)
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).
2019-10-23 09:03:44 +00:00
Diggory Hardy 6b4925a76d Merge pull request #112 from dekellum/min-cfg-if
cfg-if 0.1.2 is minimal version of dependency
2019-10-01 08:43:28 +01:00
Diggory Hardy 7f013b15d8 Merge pull request #114 from josephlr/ci
Fix and Improve WASM CI
2019-10-01 08:39:45 +01:00
Joe Richey 04f65172f5 Remove jq dep 2019-09-30 16:20:13 -07:00
Joe Richey 93312bdca7 Fix CI
- Use latest Firefox
- Explicitly pin wasmtime and cargo-web
- Make sure our `wasm-bindgen-test-runner` and `wasm-bindgen` versions match
2019-09-30 15:45:23 -07:00
David Kellum 2052159fd1 cfg-if 0.1.2 needed as minimal version of dep 2019-09-30 14:06:16 -07:00
Diggory Hardy 6bd6e048ca Merge pull request #111 from josephlr/fmt
Run Rustfmt
2019-09-23 20:48:10 +01:00
Joe Richey 3b6c90ca24 Run Rustfmt and make formatting error fail the CI 2019-09-23 10:21:23 -07:00
Joseph Richey fa6f929aed Improve CI for web targets (#108)
* 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
2019-09-21 01:46:26 -07:00
Elichai Turkel ccc47748d0 Handle zero-length slices (#104)
Ensure and document that we do nothing when an empty slice is passed.

Note that this changes are for consistency, not to prevent UB.
2019-09-19 16:41:20 -07:00
Artyom Pavlov 5cfa668403 Prepare release v0.1.12 (#103) 2019-09-06 12:01:01 +00:00
Artyom Pavlov 31e5b2fdd6 Update wasi dependency (#100) 2019-08-31 14:32:18 +00:00
Artyom Pavlov 208b318ace Prepare release v0.1.11 (#97) 2019-08-25 02:28:06 +00:00
Joseph Richey 4db1b14074 Fix Redox CI (#85)
* Fix Redox CI

* Bump libc version to fix Redox
2019-08-24 19:23:36 -07:00
Joseph Richey 8197a1824b Add back in std-only trait definitions (#96) 2019-08-24 23:00:44 +00:00
Artyom Pavlov a9b7f92965 Prepare release v0.1.10 (#93) 2019-08-17 23:27:45 +00:00
eV (㋎) f073a9575a Fix CSP error for wasm bindgen (#92) 2019-08-17 23:23:07 +00:00
Joseph Richey 73bbbdcf64 Always build on wasm32-unknown-unknown (#90)
This updates the documentation to explain exactly what we are doing on
this target. Also adds a test that the target builds without features.
2019-08-17 12:24:02 -07:00
Joseph Richey 3d1d2ff313 Wasi does not need libc (#88) 2019-08-15 00:10:22 +00:00
Artyom Pavlov e266249f61 Prepare release v0.1.9 (#83) 2019-08-14 13:55:27 +00:00
Artyom Pavlov bf54eaa557 Deny warnings in CI tests (#82) 2019-08-13 13:52:50 +00:00
Joseph Richey f94b44aa86 Add warning checks (#80) 2019-08-12 13:10:21 +00:00
Artyom Pavlov 7449a087f2 Add dummy feature (#71) 2019-08-08 14:31:41 +00:00
Artyom Pavlov 283f9f8bad Add Windows UWP support (#69) 2019-08-08 14:31:21 +00:00
Artyom Pavlov 86c2cd6265 Use wasi isntead of libc (#64) 2019-08-08 08:02:19 +00:00
Clayton Wilkinson 10e41b22d6 Updating link to Fuchsia documentation (#81) 2019-08-07 16:15:37 +00:00
Joseph Richey 98934cb4ab Add rustc-dep-of-std feature (#78) 2019-08-06 10:08:16 +00:00
Joseph Richey b69f832210 Remove libstd dependancy for Opening and Reading files (#58) 2019-08-06 10:07:22 +00:00
Artyom Pavlov 199b11576e prepare release v0.1.8 (#76) 2019-08-05 09:02:19 +00:00
Aaron Hill 6716ad06a5 Explicitly specify types to arguments of 'libc::syscall' (#74)
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.
2019-08-04 17:03:20 +00:00
Artyom Pavlov ab44edf3c7 fix readme example 2019-08-03 18:27:11 +00:00
Artyom Pavlov d93954a138 Prepare v0.1.7 release (#67) 2019-07-29 10:07:23 +00:00
Joseph Richey dadef458ba Fix stdweb extern issue (#66) 2019-07-28 08:07:07 +00:00
Joseph Richey 00c3cff101 Improve Error handling (#54) 2019-07-27 01:51:54 +00:00
Joseph Richey b3e609f8b5 Add support for hermit and l4re (#61) 2019-07-12 16:22:07 +00:00
Joseph Richey 9e0d7c7c68 Incorperate feedback on Lazy helpers (#60) 2019-07-11 20:21:45 +00:00
Joseph Richey 65660e00be Try getrandom() first on FreeBSD, add sys_fill_exact helper (#57) 2019-07-09 19:26:49 +00:00
Artyom Pavlov 1705b40655 replace mem::uninitialized with mem::zeroed 2019-07-09 18:28:51 +00:00
Syrus Akbary 0ada41a53a Updated link to the official WASI repo (#59) 2019-07-08 08:25:20 +00:00