Skip to content

Commit 40dbb54

Browse files
authored
Merge pull request #844 from rubdos/no-std
Fix no-std support.
2 parents 8e83a65 + 5a8d619 commit 40dbb54

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,13 @@ matrix:
255255
- source ~/.cargo/env || true
256256
script:
257257
- bash utils/ci/script.sh
258+
- rust: nightly
259+
env: DESCRIPTION="no_std platform test"
260+
install:
261+
- rustup target add thumbv6m-none-eabi
262+
script:
263+
# Test the top-level crate with all features:
264+
- cargo build --target=thumbv6m-none-eabi --no-default-features
258265

259266
- rust: nightly
260267
os: linux

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ A [separate changelog is kept for rand_core](rand_core/CHANGELOG.md).
88

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

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

1215
## [0.7.0] - 2019-06-28
1316

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ nightly = ["simd_support"] # enables all features requiring nightly rust
2727
serde1 = [] # does nothing, deprecated
2828

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

0 commit comments

Comments
 (0)