diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 085d795e..c7c4aeb0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -59,7 +59,7 @@ jobs: run: cd proptest && cargo build --lib --no-default-features --features std - name: Build rng no-default-features if: ${{ matrix.build == 'nightly' }} - run: cd proptest && cargo build --no-default-features --features "alloc unstable hardware-rng" + run: cd proptest && cargo build --no-default-features --features "no_std alloc unstable hardware-rng" - name: Run persistence tests if: ${{ matrix.build == 'nightly' }} run: cd proptest/test-persistence-location && ./run-tests.sh diff --git a/book/src/proptest/no-std.md b/book/src/proptest/no-std.md index 6a66d292..a3796269 100644 --- a/book/src/proptest/no-std.md +++ b/book/src/proptest/no-std.md @@ -15,7 +15,7 @@ default-features = false # alloc: Use the `alloc` crate directly. Proptest has a hard requirement on # memory allocation, so either this or `std` is needed. # unstable: Enable use of nightly-only compiler features. -features = ["alloc", "unstable"] +features = ["no_std", "alloc", "unstable"] ``` Some APIs are not available in the `no_std` build. This includes functionality diff --git a/prerelease-checks.sh b/prerelease-checks.sh index 4a351f8a..7ce7cccf 100755 --- a/prerelease-checks.sh +++ b/prerelease-checks.sh @@ -10,7 +10,7 @@ set -eux cd proptest cargo clean cargo +nightly build --target thumbv7em-none-eabihf \ - --no-default-features --features 'alloc unstable' + --no-default-features --features 'no_std alloc unstable' cargo clean cargo +nightly build --target wasm32-unknown-emscripten \ --no-default-features --features std diff --git a/proptest/Cargo.toml b/proptest/Cargo.toml index 467abde6..4566ea00 100644 --- a/proptest/Cargo.toml +++ b/proptest/Cargo.toml @@ -29,8 +29,7 @@ attr-macro = ["proptest-macro"] unstable = [] # Enables the use of standard-library dependent features -std = ["rand/std", "lazy_static", - "regex-syntax", "num-traits/std"] +std = ["rand/std", "lazy_static", "regex-syntax", "num-traits/std"] # std or libm required for mul_add. no_std = ["num-traits/libm"] @@ -57,7 +56,7 @@ timeout = ["fork", "rusty-fork/timeout"] # need it excluded, however. atomic64bit = [] -bit-set = [ "dep:bit-set", "dep:bit-vec" ] +bit-set = ["dep:bit-set", "dep:bit-vec"] [dependencies] bitflags = "2" diff --git a/proptest/gen-docs.sh b/proptest/gen-docs.sh index 19e45942..90b7e18f 100755 --- a/proptest/gen-docs.sh +++ b/proptest/gen-docs.sh @@ -10,7 +10,7 @@ set -eux if test "$1" = "nostd"; then crate=proptest-nostd cargo='cargo +nightly' - cargoflags='--no-default-features --features=alloc,unstable' + cargoflags='--no-default-features --features=no_std,alloc,unstable' else crate=proptest cargo=cargo