234 Commits

Author SHA1 Message Date
Joseph Richey
9d7a76c19e
Add Emscripten tests (#196)
See #194 

This installs (and caches) the emsdk toolchain at the last version compatible w/ stable rust. It also tests on both asmjs and wasm32, uses node by default, and works around an asm.js bug.
2021-01-05 01:38:44 -08:00
Joseph Richey
e29ed04f28
Move tests to tests/ directory (#195)
Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-03 22:24:48 -08:00
Joseph Richey
1c6749e1e3
Merge pull request #192 from rust-random/ci
Update Github Actions CI for the master branch
2021-01-03 22:03:25 -08:00
Joe Richey
7b8f2ba952 Note that installed binaries are precompiled 2021-01-03 21:26:32 -08:00
Joe Richey
e593f43daa
Clarify use of .cargo/config
Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-03 20:48:13 -08:00
Joe Richey
7687498160 Only test macOS on stable
Most of the advantages from testing various Rust versions already come
from running those tests on Linux and Windows. There's very little
gain from also running these tests on macOS, while macOS jobs are the
slowest to schedule.

Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-03 20:46:12 -08:00
Joe Richey
ea73f5a975 Update CI
- Cleanup `tests.yml`
- Add better binary downloads
- Add minimal dependancies check
- Add tests for `custom` feature
- Build/Link for iOS
- Run cross tests on aarch64 linux and Android
- Link on Solaris and Netbsd
- Test wasm code on Node, Chrome, Firefox
- Test WASI
- No need for RDRAND feature on VxWorks

Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-03 20:46:12 -08:00
Joe Richey
d5186e0c86 Add Clippy msrv configuration file
This allows us to automatically ignore lints that are
incompatible with our MSRV.

Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-03 20:46:12 -08:00
Joe Richey
3303349ef1 Use -Z build-std=core instead of xbuild
See: https://github.com/rust-osdev/cargo-xbuild#alternative-the-build-std-feature-of-cargo

Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-03 20:46:12 -08:00
Artyom Pavlov
6c94834850
Remove outdated entries from Cargo.toml (#193) 2021-01-03 20:43:15 -08:00
Artyom Pavlov
95be9b40b4
Release v0.2.1 (#188)
Updates Changelog to include v0.1.16 changes as well
2021-01-03 19:52:26 -08:00
Joe Richey
a37be0df31 Fix Target Triple
Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-03 07:38:34 -08:00
Joe Richey
a0d23eb34e Rename BCryptGenRandom impl to windows.rs 2021-01-03 07:38:34 -08:00
Joe Richey
ffb7215995 Remove RtlGenRandom implementation
Also remove outdated comment from windows_uwp.rs
2021-01-03 07:38:34 -08:00
Joseph Richey
b78e2e846d
Update badges (#189)
Point the build status badges to point to Github Actions

Add badges for:
  - Downloads
  - License

Fix formatting to make updating easier

Signed-off-by: Joe Richey <joerichey@google.com>
2021-01-03 06:21:43 -08:00
Artyom Pavlov
cadf11ecce
Fix clippy warning (#187) 2021-01-02 15:20:56 -08:00
Artyom Pavlov
77740f8c45
remove direct stdweb support (#178) 2021-01-02 02:54:25 -08:00
Artyom Pavlov
9b4bb0047f
Remove CloudABI support (#184)
* Remove CloudABI support and update CI
2021-01-02 02:42:43 -08:00
Robin Appelman
b4834a5466
Fix redox<->cloudabi mixup in supported targets list (#182) 2020-12-18 05:24:40 +00:00
Artyom Pavlov
6f11660dde
Migrate CI to GitHub Actions (#180) 2020-12-14 21:50:24 +00:00
Joe Richey
2d899940a2 Enable travis for 0.1 branch
Signed-off-by: Joe Richey <joerichey@google.com>
2020-12-02 19:01:10 +00:00
Jurgis
c29dd5f80e
Fix multithreaded wasm crash (solves #164) (#165)
Signed-off-by: Joe Richey <joerichey@google.com>
2020-10-26 13:41:31 -07:00
koushiro
3a7e605345 Update wasi to 0.10
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2020-10-15 23:11:33 -07:00
Matt Brubeck
7dd681ec08 Update to cfg-if 1.0 2020-10-15 22:25:36 -07:00
Joe Richey
5d2a4a2e56
Update Changelog for 0.2
Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-10 03:18:46 -07:00
Joe Richey
5f4886bce1 Merge branch 'master' into 0.2 2020-09-10 00:57:38 -07:00
Joe Richey
b9299988ea docs: add target triple to docs table
Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-10 00:45:13 -07:00
Joe Richey
e0c155e201 docs: Clarify deps of root binary crate
Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-10 00:45:13 -07:00
Joe Richey
b8c0c8d006 custom: Add check for function type
This makes sure we get a good compiler error if we give a bad path.

Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-10 00:45:13 -07:00
Joe Richey
1ebd2ce0e3 docs: Clarify intended usage for Custom RNGs
Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-10 00:45:13 -07:00
Joe Richey
a6fa63c607 docs: Update section headers
Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-10 00:45:13 -07:00
Joe Richey
bf6d124d53 travis: Make sure to run docs tests for all features
Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-10 00:45:13 -07:00
Joe Richey
b4160604d7 docs: Clarify when/where to use custom implementations
Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-10 00:45:13 -07:00
Joe Richey
e8ff222285 docs: Update wasm32 support section
Include more links, exampales, and clarify wording

Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-10 00:45:13 -07:00
Joe Richey
4f4009a10f Format compile_error!
Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-10 00:45:13 -07:00
Joe Richey
99260dfaef Update docs for 0.2
The main things here are clarifying how fallback functionatliy works.

Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-10 00:45:13 -07:00
Joe Richey
4d750dd240 travis: Enable Firefox testing
https://github.com/rustwasm/wasm-bindgen/pull/2305 released the bugfix for wasm-bindgen.

Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-09 00:53:31 -07:00
Joe Richey
c36dc821e1 travis: Stop pinning nightly on 0.2
Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-08 06:02:32 -07:00
Joe Richey
7dcb167694 travis: Stop Pinning nightly
Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-08 05:53:45 -07:00
Joe Richey
9ec7d217a8 travis: Move cloudabi to xbuild section
Cloud ABI [is now Tier 3](https://github.com/rust-lang/rust/pull/75568),
so its libstd is no longer distributed with Rust.

Firefox testing is also disabled due to:
  https://github.com/rustwasm/wasm-bindgen/issues/2261

Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-08 05:53:45 -07:00
Joe Richey
d8679fbf5e travis: Update pinned dependancies
Also, pin the version of rustc, so that nightly updates don't break
our build. This means that we can add the nightlies back into the
blocking set of tests.

Update the Ubuntu version to 20.04
Don't run any cargo-web tests (upstream is broken)

Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-08 05:53:45 -07:00
Joe Richey
0a5017eadb Update MSRV to 1.34
Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-08 05:31:43 -07:00
Joe Richey
2723e7f1d7 travis: Apply #157 to 0.2 branch
Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-08 03:08:19 -07:00
Joe Richey
24e588619e bsd_arandom: Read only 256 bytes at a time
Older NetBSD kernels cannot handle buffers bigger than 256 bytes, and
all FreeBSD and NetBSD kernels only return up to 256 bytes per call.

Signed-off-by: Joe Richey <joerichey@google.com>
2020-08-14 05:04:08 -07:00
Joe Richey
fc83790262 rustfmt: Run cargo fmt 2020-07-21 21:08:56 -07:00
Artyom Pavlov
2b03b0e0b8 Remove workaround for older Linux kernels
Minimum supported kernel version got bumped to 2.6.32 in rust-lang/rust#74163
2020-07-21 20:52:02 -07:00
Joe Richey
f6af828725 ci: Remove old reference to wasm-bindgen-getrandom
Signed-off-by: Joe Richey <joerichey@google.com>
2020-07-21 13:31:17 -07:00
Joe Richey
706a4298fc stdweb: Remove CI runs with cargo-web
Right now "cargo web test" is broken due to upstream changes. We will
disable stdweb tests until the stdweb project fixes things.

See: https://github.com/koute/cargo-web/issues/243

Signed-off-by: Joe Richey <joerichey@google.com>
2020-07-21 13:31:17 -07:00
Joe Richey
11b4f9e406 wasm: Update testing framework
Add back the "test-in-browser" feature. This makes it easier to manage
a single file containing all of the test code.

Signed-off-by: Joe Richey <joerichey@google.com>
2020-05-29 01:11:13 -07:00
Joe Richey
eacffd578a wasm: Move JS-based Custom RNGs back into the main crate
They will be gated behind the "js" feature, as we can now do detect,
at compile-time, which implementation (wasm-bindgen vs stdweb) we
should use.

The "js" implementation takes precedence over the "custom"
implementation. This prevents issues that arise from the buggy way
Cargo handles features across multiple targets.

Signed-off-by: Joe Richey <joerichey@google.com>
2020-05-29 01:11:13 -07:00