Skip to content

Commit cd64564

Browse files
Merge pull request #2 from michaelciraci/no-std
No std
2 parents 6a3f2f4 + 565fd66 commit cd64564

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
[package]
22
name = "monarch-butterfly"
3-
version = "0.3.1"
3+
version = "0.4.0"
44
edition = "2021"
55
description = "Proc-Macro unrolled FFTs"
66
license = "MIT"
77
documentation = "https://docs.rs/monarch-butterfly"
88
homepage = "https://github.com/michaelciraci/Monarch-Butterfly"
99
repository = "https://github.com/michaelciraci/Monarch-Butterfly"
1010
rust-version = "1.63"
11-
keywords = ["fft", "dft", "discrete", "fourier", "transform"]
11+
keywords = ["fft", "dft", "discrete", "fourier", "transform", "no_std"]
1212
categories = ["algorithms", "science"]
1313

1414
[dependencies]
15-
monarch-derive = "=0.3.0"
15+
monarch-derive = "=0.4.0"
1616
num-complex = "0.4"
17-
num-traits = "0.2"
17+
num-traits = { version = "0.2", default-features = false }
1818

1919
[dev-dependencies]
2020
rustfft = "6.2.0"

crates/monarch-derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "monarch-derive"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
edition = "2021"
55
description = "Proc-Macro unrolled FFTs"
66
license = "MIT"

crates/monarch-derive/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub fn generate_switch(_input: TokenStream) -> TokenStream {
8989
quote! {
9090
#s => {
9191
let x = #func(x_in);
92-
std::array::from_fn(|i| x[i])
92+
core::array::from_fn(|i| x[i])
9393
},
9494
}
9595
});
@@ -99,7 +99,7 @@ pub fn generate_switch(_input: TokenStream) -> TokenStream {
9999
quote! {
100100
#s => {
101101
let x = #func(x_in);
102-
std::array::from_fn(|i| x[i])
102+
core::array::from_fn(|i| x[i])
103103
},
104104
}
105105
});
@@ -120,7 +120,7 @@ pub fn generate_switch(_input: TokenStream) -> TokenStream {
120120
assert_eq!(x_in.len(), N);
121121

122122
match N {
123-
1 => { std::array::from_fn(|i| x_in[i]) },
123+
1 => { core::array::from_fn(|i| x_in[i]) },
124124
#(#ss_forward)*
125125
_ => unimplemented!(),
126126
}
@@ -141,7 +141,7 @@ pub fn generate_switch(_input: TokenStream) -> TokenStream {
141141
assert_eq!(x_in.len(), N);
142142

143143
match N {
144-
1 => { std::array::from_fn(|i| x_in[i]) },
144+
1 => { core::array::from_fn(|i| x_in[i]) },
145145
#(#ss_inverse)*
146146
_ => unimplemented!(),
147147
}

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
5050
#![allow(clippy::excessive_precision)]
5151
#![forbid(unsafe_code)]
52+
#![no_std]
5253

5354
use num_complex::Complex;
5455
use num_traits::{Float, FloatConst};

0 commit comments

Comments
 (0)