RustFFT

High-performance, SIMD-accelerated FFT library written in pure Rust.

Library
Cargo
v6.4.1
926stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
41/100Fair
Development Activity0
Maintenance20
Community56
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
85/100Excellent
Architecture90
Code Quality85
Innovation85
Learning Curve82

RustFFT is a pure-Rust library for computing fast Fourier transforms of any size, including awkward prime-number lengths, in O(n log n) time. You describe the transform you want through an FftPlanner, which selects and caches the optimal algorithm for that size, then run it repeatedly over complex-number buffers.

Its headline feature is transparent SIMD acceleration: the planner automatically detects and uses AVX and SSE on x86_64, NEON on AArch64, and the fixed-width SIMD extension on WebAssembly, all without any special code from the caller. Written entirely in safe-first Rust with no C dependencies, it powers audio, DSP, and scientific-computing workloads across the Rust ecosystem.

What You Get

  • An FftPlanner that plans forward and inverse FFTs of any length and caches the result
  • Automatic AVX/SSE (x86_64), NEON (AArch64), and WASM SIMD acceleration with no code changes
  • Support for f32 and f64 precision over num-complex Complex buffers
  • A pure-Rust implementation with no C or system FFT dependencies

Common Use Cases

  • Analyzing audio and signal spectra in DSP and music-processing tools
  • Running scientific and numerical computations that require frequency-domain transforms
  • Building real-time or embedded Rust applications that need fast, portable FFTs

Under The Hood

Architecture - The entry point is FftPlanner (src/plan.rs), which inspects the requested size and target CPU features and dispatches to a scalar planner or one of the SIMD planners under src/avx, src/sse, and src/neon. It factors composite sizes into mixed-radix and Bluestein/Rader sub-transforms (src/algorithm), caches sub-plans through fft_cache.rs, and returns a boxed Fft trait object whose process method runs in place over a &mut [Complex<T>] buffer. Shared helpers like array_utils.rs and math_utils.rs back the algorithm implementations.

Tech Stack - Pure Rust (minimum rustc 1.61), building on num-complex for the Complex type and num-integer/num-traits for numeric generics. Cargo feature flags (avx, sse, neon on by default, plus opt-in wasm_simd) gate the per-architecture SIMD modules, and CPU feature detection at runtime selects the fastest path with no unsafe surface exposed to callers.

Code Quality - The crate carries extensive test coverage across algorithm variants and precisions, benchmark suites, and CI matrices spanning x86_64, AArch64, and WASM. SIMD code is isolated behind cfg-gated modules so the scalar path stays portable, and the planner’s caching keeps repeated construction correct and cheap.

API Design - The public surface is deliberately tiny: create a planner, call plan_fft_forward/plan_fft_inverse with a size, and call process on the returned FFT. SIMD acceleration is entirely transparent, so users write the same three lines regardless of target, and docs.rs coverage plus a clear README example keep onboarding fast.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search