Skip to content

Commit

Permalink
Break out separate libm feature and require either libm or std
Browse files Browse the repository at this point in the history
  • Loading branch information
dflemstr committed Oct 26, 2019
1 parent 3184b89 commit 0387606
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Cargo.toml
Expand Up @@ -16,7 +16,7 @@ bench = false
test = true

[dependencies]
num-traits = { version = "0.2.8", default-features = false, features = ["libm"] }
num-traits = { version = "0.2.8", default-features = false }
num-complex = { version = "0.2.3", default-features = false }

[dev-dependencies]
Expand All @@ -31,6 +31,7 @@ features=["complex"]
default = ["std"]
docs = []
std = ["num-traits/std", "num-complex/std"]
libm = ["num-traits/libm"]

[patch.crates-io]
num-traits = { git = "https://github.com/rust-num/num-traits.git" }
3 changes: 3 additions & 0 deletions src/lib.rs
Expand Up @@ -8,6 +8,9 @@
//! version 2.0 (the "License"). You can obtain a copy of the License at
//! http://mozilla.org/MPL/2.0/ .

#[cfg(not(any(feature = "std", feature = "libm")))]
compile_error!("Either feature 'std' or feature 'libm' must be enabled for 'chfft' to work");

#[cfg(not(feature = "std"))]
#[macro_use]
extern crate alloc;
Expand Down

0 comments on commit 0387606

Please sign in to comment.