From 0f6171b7883f07659c673caee6dbe5ed3adcf9a1 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Fri, 15 Dec 2017 12:42:37 -0800 Subject: [PATCH] Try to make stdsimd an optional dependency --- Cargo.toml | 12 ++++++++---- src/lib.rs | 2 -- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 31ba298..4179b8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,8 +24,9 @@ rustdoc-args = ["--html-in-header", ".cargo/registry/src/github.com-1ecc6299db9e [badges] travis-ci = { repository = "isislovecruft/curve25519-dalek", branch = "master"} -[dependencies] -stdsimd = { git = "https://github.com/rust-lang-nursery/stdsimd" } +[dependencies.stdsimd] +git = "https://github.com/rust-lang-nursery/stdsimd" +optional = true [dependencies.serde] version = "1.0" @@ -62,7 +63,10 @@ generic-array = "^0.8" digest = "0.6" arrayref = "0.3.4" clear_on_drop = "=0.2.3" -stdsimd = { git = "https://github.com/rust-lang-nursery/stdsimd" } + +[build-dependencies.stdsimd] +git = "https://github.com/rust-lang-nursery/stdsimd" +optional = true [build-dependencies.serde] version = "1.0" @@ -80,4 +84,4 @@ radix_51 = [] # Include precomputed basepoint tables. This is off by default so that build.rs can generate the tables, and then re-enabled by build.rs in the main-stage compilation. precomputed_tables = [] # experimental avx2 support -avx2_backend = ["radix_51"] +avx2_backend = ["nightly"] diff --git a/src/lib.rs b/src/lib.rs index 8eb2c38..6c4ed32 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,9 +13,7 @@ #![cfg_attr(feature = "nightly", feature(i128_type))] #![cfg_attr(feature = "nightly", feature(cfg_target_feature))] #![cfg_attr(feature = "bench", feature(test))] -#![cfg_attr(all(feature = "nightly", feature = "std"), feature(zero_one))] -#![allow(unused_features)] #![deny(missing_docs)] // refuse to compile if documentation is missing //! # curve25519-dalek