diff --git a/Cargo.toml b/Cargo.toml index f62bacf..d821af7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "monarch-butterfly" -version = "0.3.1" +version = "0.4.0" edition = "2021" description = "Proc-Macro unrolled FFTs" license = "MIT" @@ -8,13 +8,13 @@ documentation = "https://docs.rs/monarch-butterfly" homepage = "https://github.com/michaelciraci/Monarch-Butterfly" repository = "https://github.com/michaelciraci/Monarch-Butterfly" rust-version = "1.63" -keywords = ["fft", "dft", "discrete", "fourier", "transform"] +keywords = ["fft", "dft", "discrete", "fourier", "transform", "no_std"] categories = ["algorithms", "science"] [dependencies] -monarch-derive = "=0.3.0" +monarch-derive = "=0.4.0" num-complex = "0.4" -num-traits = "0.2" +num-traits = { version = "0.2", default-features = false } [dev-dependencies] rustfft = "6.2.0" diff --git a/crates/monarch-derive/Cargo.toml b/crates/monarch-derive/Cargo.toml index acc9a07..fb6464a 100644 --- a/crates/monarch-derive/Cargo.toml +++ b/crates/monarch-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "monarch-derive" -version = "0.3.0" +version = "0.4.0" edition = "2021" description = "Proc-Macro unrolled FFTs" license = "MIT" diff --git a/crates/monarch-derive/src/lib.rs b/crates/monarch-derive/src/lib.rs index 3c24702..e47c802 100644 --- a/crates/monarch-derive/src/lib.rs +++ b/crates/monarch-derive/src/lib.rs @@ -89,7 +89,7 @@ pub fn generate_switch(_input: TokenStream) -> TokenStream { quote! { #s => { let x = #func(x_in); - std::array::from_fn(|i| x[i]) + core::array::from_fn(|i| x[i]) }, } }); @@ -99,7 +99,7 @@ pub fn generate_switch(_input: TokenStream) -> TokenStream { quote! { #s => { let x = #func(x_in); - std::array::from_fn(|i| x[i]) + core::array::from_fn(|i| x[i]) }, } }); @@ -120,7 +120,7 @@ pub fn generate_switch(_input: TokenStream) -> TokenStream { assert_eq!(x_in.len(), N); match N { - 1 => { std::array::from_fn(|i| x_in[i]) }, + 1 => { core::array::from_fn(|i| x_in[i]) }, #(#ss_forward)* _ => unimplemented!(), } @@ -141,7 +141,7 @@ pub fn generate_switch(_input: TokenStream) -> TokenStream { assert_eq!(x_in.len(), N); match N { - 1 => { std::array::from_fn(|i| x_in[i]) }, + 1 => { core::array::from_fn(|i| x_in[i]) }, #(#ss_inverse)* _ => unimplemented!(), } diff --git a/src/lib.rs b/src/lib.rs index 6f21060..5af4997 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -49,6 +49,7 @@ #![allow(clippy::excessive_precision)] #![forbid(unsafe_code)] +#![no_std] use num_complex::Complex; use num_traits::{Float, FloatConst};