mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Merge remote-tracking branch 'chain/no_std-fix' into develop
This commit is contained in:
commit
4e63cbfe4c
4 changed files with 9 additions and 5 deletions
|
|
@ -37,6 +37,8 @@ matrix:
|
|||
env: TEST_COMMAND=build EXTRA_FLAGS=--no-default-features FEATURES=''
|
||||
- rust: beta
|
||||
env: TEST_COMMAND=build EXTRA_FLAGS=--no-default-features FEATURES=''
|
||||
- rust: nightly
|
||||
env: TEST_COMMAND=build EXTRA_FLAGS=--no-default-features FEATURES='alloc'
|
||||
|
||||
script:
|
||||
- cargo $TEST_COMMAND --features="$FEATURES" $EXTRA_FLAGS
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ version = "0.6"
|
|||
nightly = ["radix_51"]
|
||||
default = ["std"]
|
||||
std = ["rand"]
|
||||
alloc = []
|
||||
yolocrypto = []
|
||||
bench = []
|
||||
# Radix-51 arithmetic using u128
|
||||
|
|
|
|||
|
|
@ -77,8 +77,8 @@
|
|||
// affine and projective cakes and eat both of them too.
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use collections::Vec;
|
||||
#[cfg(feature = "alloc")]
|
||||
use alloc::Vec;
|
||||
|
||||
use core::fmt::Debug;
|
||||
use core::iter::Iterator;
|
||||
|
|
@ -1194,6 +1194,7 @@ pub mod vartime {
|
|||
///
|
||||
/// A vector of `Scalar`s and a vector of `ExtendedPoints`. It is an
|
||||
/// error to call this function with two vectors of different lengths.
|
||||
#[cfg(any(feature = "alloc", feature = "std"))]
|
||||
pub fn k_fold_scalar_mult<'a, 'b, I, J>(scalars: I, points: J) -> ExtendedPoint
|
||||
where I: IntoIterator<Item = &'a Scalar>,
|
||||
J: IntoIterator<Item = &'b ExtendedPoint>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
// - Henry de Valence <hdevalence@hdevalence.ca>
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg_attr(not(feature = "std"), feature(collections))]
|
||||
#![cfg_attr(feature = "alloc", feature(alloc))]
|
||||
#![cfg_attr(feature = "nightly", feature(i128_type))]
|
||||
#![cfg_attr(feature = "bench", feature(test))]
|
||||
#![cfg_attr(all(feature = "nightly", feature = "std"), feature(zero_one))]
|
||||
|
|
@ -60,8 +60,8 @@ extern crate core;
|
|||
#[cfg(feature = "std")]
|
||||
extern crate rand;
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
extern crate collections;
|
||||
#[cfg(feature = "alloc")]
|
||||
extern crate alloc;
|
||||
|
||||
// Modules for low-level operations directly on field elements and curve points.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue