mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
This change provides a common convention for using allocator-dependent
features with:
#![cfg(feature = "alloc")]
When available, `Vec` is imported consistently as `prelude::Vec`, which
means modules that need access to `Vec` can simply do:
use prelude::*;
and if an allocator is available, `Vec` will be in the crate prelude.
This allows all `alloc` vs `std` gating to be handled in `lib.rs`,
`build.rs`, and `prelude.rs` so the rest of the codebase doesn't have to
do any gating whatsoever.
37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
language: rust
|
|
|
|
rust:
|
|
- stable
|
|
- nightly
|
|
|
|
env:
|
|
# Tests the u32 backend
|
|
- TEST_COMMAND=test EXTRA_FLAGS='--no-default-features' FEATURES='std u32_backend'
|
|
# Tests the u64 backend
|
|
- TEST_COMMAND=test EXTRA_FLAGS='--no-default-features' FEATURES='std u64_backend'
|
|
# Tests the avx2 backend
|
|
- TEST_COMMAND=test EXTRA_FLAGS='--no-default-features' FEATURES='std avx2_backend'
|
|
# Tests serde support and default feature selection
|
|
- TEST_COMMAND=test EXTRA_FLAGS='' FEATURES='serde'
|
|
# Tests building without std. We have to select a backend, so we select the one
|
|
# most likely to be useful in an embedded environment.
|
|
- TEST_COMMAND=build EXTRA_FLAGS='--no-default-features' FEATURES='u32_backend'
|
|
# Tests no_std+alloc usage using the most embedded-friendly backend
|
|
- TEST_COMMAND=test EXTRA_FLAGS='--lib --no-default-features' FEATURES='alloc u32_backend'
|
|
|
|
matrix:
|
|
exclude:
|
|
# Test the avx2 backend only on nightly
|
|
- rust: stable
|
|
env: TEST_COMMAND=test EXTRA_FLAGS='--no-default-features' FEATURES='std avx2_backend'
|
|
# Test no_std+alloc only on nightly
|
|
- rust: stable
|
|
env: TEST_COMMAND=test EXTRA_FLAGS='--lib --no-default-features' FEATURES='alloc u32_backend'
|
|
|
|
script:
|
|
- cargo $TEST_COMMAND --features="$FEATURES" $EXTRA_FLAGS
|
|
|
|
notifications:
|
|
slack:
|
|
rooms:
|
|
- dalek-cryptography:Xxv9WotKYWdSoKlgKNqXiHoD#dalek-bots
|