Commit Graph

105 Commits

Author SHA1 Message Date
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
Joseph Richey ca33db9df2 Remove Bitrig support (#56) 2019-07-07 20:48:54 +00:00
Joseph Richey 479d036949 Use cfg-if to simplify lib.rs (#55) 2019-07-05 15:47:51 +00:00
Joseph Richey 0c72017424 Remove lazy_static dependancy (#52) 2019-07-04 15:29:48 +00:00
Joseph Richey b1e81542f8 Add Structures for lock-free initialization (#51) 2019-07-02 12:27:19 +00:00
Joseph Richey 61cd3c287e openBSD: Make imports consistent (#53) 2019-07-02 04:30:28 +00:00
Artyom Pavlov 4f654084bf link fix 2019-07-01 11:59:18 +00:00
newpavlov e02e9466f9 release v0.1.6 2019-06-30 07:40:23 +03:00
Joseph Richey cbc44ee350 Alternative way to detect AMD bug (#48) 2019-06-30 03:32:01 +00:00
Artyom Pavlov 30ac77336e prepare release v0.1.5 (#47) 2019-06-29 13:53:32 +00:00
Joseph Richey e992e45701 macOS: Try getentropy() then fallback to /dev/random (#46) 2019-06-29 00:42:00 +00:00
Joseph Richey 5b567346be Check for AMD RDRAND bug (#43) 2019-06-29 00:32:58 +00:00
Joseph Richey 11eefaaae6 Use shared File instead of shared FD. (#45) 2019-06-29 00:08:21 +00:00
Artyom Pavlov 31ce3760a5 version typo fix 2019-06-28 11:51:11 +00:00
Artyom Pavlov 70f6ff70b7 Prepare v0.1.4 release (#42) 2019-06-28 11:45:13 +00:00
Joseph Richey ea999a6dd2 Remove cloudabi, winapi, and fuchsia-cprng dependancies (#40) 2019-06-27 17:24:17 +00:00
Diggory Hardy 5c7faa51e7 Merge pull request #39 from josephlr/rustfmt
Run Rustfmt on entire repo
2019-06-26 11:38:32 +01:00
Joseph Richey 27b883f6d5 Update docs with RDRAND link (#41)
Also mention it's how we get randomness on UEFI
2019-06-26 09:58:19 +00:00
Joe Richey 3d8373b89d Run Rustfmt on entire repo 2019-06-26 02:56:41 -07:00
Joseph Richey af4ea8dc47 Remove TLS by using lazy_static (#25) 2019-06-25 19:58:44 +00:00
Joseph Richey a91b60b475 freebsd: Increase consistancy with libc implementation (#36) 2019-06-19 09:54:51 +00:00
Diggory Hardy 0b87a0974b Merge pull request #30 from josephlr/uefi
Support x86_64-unknown-uefi
2019-06-17 09:17:35 +01:00
Joe Richey 8053d7ec3b Improve compile_error! message 2019-06-16 15:12:44 -07:00
Joe Richey 25bd5a558b Fix cfg guards 2019-06-15 21:24:06 -07:00
Joe Richey 5c6294ae7b Add error for sgx && !rdrand 2019-06-15 21:24:06 -07:00
Joe Richey fc8ab62f59 Add missing not 2019-06-15 21:24:06 -07:00
Joe Richey 94440e117b Use custom implementation of is_rdrand_supported 2019-06-15 21:24:06 -07:00
Joe Richey 0381ee0ce0 Support x86_64-unknown-uefi 2019-06-15 21:24:06 -07:00
Joseph Richey ac7a5426b9 Fix long buffer issues (#33) 2019-06-14 18:13:44 +00:00
Joseph Richey bcad3fb877 macos: Cleanup SecRandom type (#28) 2019-06-12 11:04:05 +00:00
Joseph Richey 9e6408260f Improve RDRAND implementation (#24)
* Move sgx.rs to rdrand.rs

* Improve RDRAND implementation
2019-06-12 10:39:44 +00:00
Joseph Richey 50212bd5ed linux: Use libc::GRND_NONBLOCK (#29)
We don't need to define this ourself. Introduced in libc 0.2.34:
  See: https://github.com/rust-lang/libc/pull/830
2019-06-12 09:48:32 +00:00
Joseph Richey ce4a089878 Add a (nonfailing) rustfmt check to the CI (#23) 2019-06-10 23:41:34 +00:00
Joseph Richey db27e97d94 Don't block in getrandom() detection (#26)
On Linux, we detect if `getrandom` is present by calling getrandom with
an empty buffer and seeing if `ENOSYS` is returned. However, even with
an empty buffer, this call will block unless we explicitly pass a flag.

This can be seen in the source for `getrandom`:
  https://elixir.bootlin.com/linux/v5.1.8/source/drivers/char/random.c#L2043

This change adds a boolean parameter to `syscall_getrandom` to control
the blocking behavior. We now don't block in initialization, but do
block when actually reading random data.
2019-06-10 16:34:43 +00:00
Diggory Hardy 0a18857988 Merge pull request #22 from sunfishcode/master
Update the WASI support.
2019-05-16 08:50:58 +01:00
Dan Gohman 33a61573fb Bump the cargo version and add a CHANGELOG.md entry. 2019-05-15 12:41:04 -07:00
Dan Gohman 6eb55f15d0 Update the WASI support.
- WASI is now categorized as an OS rather than an environment.
   (https://github.com/rust-lang/rust/pull/60117)
 - The WASI triple is renamed from wasm32-unknown-wasi to wasm32-wasi.
   (https://github.com/rust-lang/rust/pull/60585)
2019-05-15 11:50:27 -07:00
Diggory Hardy 3142dee2f3 Merge pull request #20 from nipzu/master
Added support for wasm32-unknown-wasi
2019-04-06 15:23:22 +01:00
nipzu 0f411bb8d3 Update README 2019-04-06 16:01:01 +03:00
nipzu dffc125981 Update crate version to 0.1.2
Update crate version to 0.1.2
2019-04-06 15:26:58 +03:00
nipzu 0b52d8e83d Update crate version 2019-04-06 15:23:30 +03:00
nipzu 8395a9e39b Update changelog 2019-04-06 15:22:48 +03:00
nipzu 3d2682e809 Added some tests for wasm32-unknown-wasi 2019-04-06 14:15:34 +03:00
nipzu d8bbf433e2 Added support for wasm32-unknown-wasi 2019-04-06 13:55:26 +03:00