Commit Graph

222 Commits

Author SHA1 Message Date
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
Joe Richey 6aba12ccdb Rename "cpu" feature to "rdrand"
Signed-off-by: Joe Richey <joerichey@google.com>
2020-05-28 19:03:02 -07:00
Joe Richey 618593ca03 cpu: Have "cpu" feature take precedence over "custom"
Right now, features are always enabled across all targets. This means
that if _any_ Custom RNG is used _anywhere_ in a crate's dependancy
graph on _any_ target. The "custom" feature will be active on all
targets.

This makes it impossible to have a bare metal target that uses "cpu" on
x86_64 and a Custom RNG on aarch64. This solution also makes sure that
any implementation `getrandom` itself provides cannot be overridden.

Signed-off-by: Joe Richey <joerichey@google.com>
2020-05-28 19:03:02 -07:00
Joe Richey a29180afcd wasm32: Unify error codes an implementations
Right now, while our implementations for stdweb and wasm-bindgen use
similar APIs, they do not use similar implementations. This change:

  - Switches to using the same error codes for both implementations
  - Uses error codes that detail exactly what API is missing
  - Cleans up the implemetnations to make them much more readable
  - Consitantly use thread_local in both implementations

This makes issues easier to debug and the code easier to understand.

Signed-off-by: Joe Richey <joerichey@google.com>
2020-05-25 13:20:12 -07:00
Joe Richey 10df5588c2 AppVeyor: Run CI on 0.2 branch
Signed-off-by: Joe Richey <joerichey@google.com>
2020-05-25 12:13:57 -07:00
Joe Richey 7631f75292 ci: Pin the Cross binary to avoid breaking the CI
Signed-off-by: Joe Richey <joerichey@google.com>
2020-05-25 03:00:58 -07:00
Diggory Hardy 8191d7f26b Merge pull request #143 from josephlr/fixing-webpack-warning
Apply #137 to 0.2 branch
2020-04-28 08:45:26 +01:00
Pauan ec4a3e1f03 Fixing Webpack require warning 2020-04-27 15:57:14 -07:00
zer0x64 7bfdabf358 wasm-bindgen: Added support for Internet Explorer 11 2020-04-27 06:22:44 -07:00
zer0x64 0ad1c77214 wasm-bindgen: Added support for Internet Explorer 11 2020-04-27 06:22:04 -07:00
Pauan f1c264d476 Fixing Webpack require warning 2020-04-27 02:45:09 -07:00
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