Skip to content

Commit

Permalink
Merge pull request #844 from rubdos/no-std
Browse files Browse the repository at this point in the history
Fix no-std support.
  • Loading branch information
dhardy committed Jul 26, 2019
2 parents 8e83a65 + 5a8d619 commit 40dbb54
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Expand Up @@ -255,6 +255,13 @@ matrix:
- source ~/.cargo/env || true
script:
- bash utils/ci/script.sh
- rust: nightly
env: DESCRIPTION="no_std platform test"
install:
- rustup target add thumbv6m-none-eabi
script:
# Test the top-level crate with all features:
- cargo build --target=thumbv6m-none-eabi --no-default-features

- rust: nightly
os: linux
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,9 @@ A [separate changelog is kept for rand_core](rand_core/CHANGELOG.md).

You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.html) useful.

## [Unreleased]
- Fix `no_std` behaviour, appropriately enable c2-chacha's `std` feature (#844)
- Add a `no_std` target to CI to continously evaluate `no_std` status (#844)

## [0.7.0] - 2019-06-28

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Expand Up @@ -27,7 +27,7 @@ nightly = ["simd_support"] # enables all features requiring nightly rust
serde1 = [] # does nothing, deprecated

# Optional dependencies:
std = ["rand_core/std", "alloc", "getrandom"]
std = ["rand_core/std", "rand_chacha/std", "alloc", "getrandom"]
alloc = ["rand_core/alloc"] # enables Vec and Box support (without std)
# re-export optional WASM dependencies to avoid breakage:
wasm-bindgen = ["getrandom_package/wasm-bindgen"]
Expand Down Expand Up @@ -74,7 +74,7 @@ libc = { version = "0.2.22", default-features = false }
# Emscripten does not support 128-bit integers, which are used by ChaCha code.
# We work around this by using a different RNG.
[target.'cfg(not(target_os = "emscripten"))'.dependencies]
rand_chacha = { path = "rand_chacha", version = "0.2.1" }
rand_chacha = { path = "rand_chacha", version = "0.2.1", default-features = false }
[target.'cfg(target_os = "emscripten")'.dependencies]
rand_hc = { path = "rand_hc", version = "0.2" }

Expand Down

0 comments on commit 40dbb54

Please sign in to comment.