From e5aba75001a0ff062978db9557800b8dd155aa3e Mon Sep 17 00:00:00 2001 From: Miikka Salminen Date: Fri, 6 Jun 2025 18:55:06 +0300 Subject: [PATCH] Provide same features as RustFFT, mapping to them one-to-one --- Cargo.toml | 11 ++++++++++- README.md | 3 ++- src/lib.rs | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7bd730b..4688e1c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,8 +12,17 @@ readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[features] +# Map RealFFT's features one-to-one with RustFFT's. For more information, refer +# to the Feature Flags section at https://docs.rs/rustfft/latest/rustfft/ +default = ["rustfft/default"] +avx = ["rustfft/avx"] +sse = ["rustfft/sse"] +neon = ["rustfft/neon"] +wasm_simd = ["rustfft/wasm_simd"] + [dependencies] -rustfft = "6.2.0" +rustfft = { version = "6.2.0", default-features = false } [dev-dependencies] criterion = "0.3" diff --git a/README.md b/README.md index 289a2c1..4af3add 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ This library is a wrapper for [RustFFT](https://crates.io/crates/rustfft) that enables fast and convenient FFT of real-valued data. -The API is designed to be as similar as possible to RustFFT. +The API is designed to be as similar as possible to RustFFT. Also, the feature flags are passed +on to RustFFT, allowing selection of its features – they do not affect RealFFT itself. Using this library instead of RustFFT directly avoids the need of converting real-valued data to complex before performing a FFT. diff --git a/src/lib.rs b/src/lib.rs index c235b54..c1b3bf3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,8 @@ //! //! This library is a wrapper for [RustFFT](https://crates.io/crates/rustfft) //! that enables fast and convenient FFT of real-valued data. -//! The API is designed to be as similar as possible to RustFFT. +//! The API is designed to be as similar as possible to RustFFT. Also, the feature flags are passed +//! on to RustFFT, allowing selection of its features – they do not affect RealFFT itself. //! //! Using this library instead of RustFFT directly avoids the need of converting //! real-valued data to complex before performing a FFT.