Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add no_std to alloc contexts #528

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion book/src/proptest/no-std.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion prerelease-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions proptest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion proptest/gen-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading