An FFT is a primitive. Real DSP work lives in the layer above it — and that layer just shipped.
Today we released OxiFFT 0.1.4 — a patch release that grows OxiFFT from a transform engine into a signal-processing toolkit, adding a signal module (Hilbert, Welch PSD, cepstrum, resampling) and mel-spectrogram / MFCC analysis for audio.
No C. No Fortran. No FFTW. No FFI. OxiFFT is Pure Rust to the core: its default features are 100% Rust, and it compiles to a single static binary — or to WASM — with nothing to link against and nothing to pkg-config. It displaces the native incumbents head-on: FFTW3 in the C/Fortran world, and rustfft for the Rust niche. OxiFFT is positioned as a Pure Rust port of FFTW3 — the “Fastest Fourier Transform in the West” — without inheriting its build system.
Why 0.1.4 matters
A bare FFT gets you spectra. It does not get you an amplitude envelope, a power spectral density estimate, a cepstrum, or a mel filterbank — and those are what most real signal and audio pipelines actually consume. 0.1.4 closes that gap:
- Analytic signals out of the box —
hilbert()andenvelope()give you the analytic signal and its amplitude envelope directly, no manual quadrature. - Spectral estimation that doesn’t leak — Welch’s method (
welch(),periodogram()) with selectable windows turns noisy signals into stable PSD estimates. - Cepstral analysis — real and complex cepstrum plus minimum-phase reconstruction, for pitch, deconvolution, and homomorphic filtering.
- FFT-based resampling —
resample()/resample_to()change sample rate via spectral zero-padding and truncation, no polyphase filter design required. - Audio features for free — log-mel spectrograms and MFCCs, the front end every speech and audio model starts from.
Technical Deep Dive
The signal module. The new signal feature (which requires std) lives in oxifft/src/signal/ and is organized by concern: hilbert.rs for analytic-signal work (hilbert, envelope, instantaneous_phase, instantaneous_frequency), spectral.rs for estimation (welch, periodogram, cross_spectral_density, coherence), cepstrum.rs for real_cepstrum, complex_cepstrum (with phase unwrapping), and minimum_phase, and resample.rs for resample / resample_to. Windowing is configured through the SpectralWindow enum (Rectangular, Hann, Hamming, Blackman) and the WelchConfig struct, so segment length, overlap, and taper are all explicit.
Mel-frequency analysis. The streaming feature gains the audio front end in oxifft/src/streaming/mel.rs: build_mel_filterbank() constructs the triangular mel filterbank matrix, mel_spectrogram() produces a log-mel spectrogram from a raw signal, and mfcc() applies a DCT over the log-mel spectrogram to yield Mel-Frequency Cepstral Coefficients. A single MelConfig struct carries the parameters — sample rate, FFT size, hop size, number of mel bands, and the f_min / f_max frequency bounds.
A cleaner SIMD core. Under the hood, the DFT SIMD codelet path was refactored to respect the 2000-line file policy: the former dft/codelets/simd.rs (2813 lines) is now the directory module oxifft/src/dft/codelets/simd/, split into mod.rs (dispatch and re-exports), backends.rs (the SSE2/AVX2/NEON/x86_64 backends), small_sizes.rs (f64 dispatch for sizes 2–32), large_sizes.rs (f64 dispatch for sizes 64–4096 with precomputed twiddles), and tests.rs. Same hot paths, easier to navigate and extend.
Getting Started
cargo add oxifft
# the signal-processing module is behind a feature flag:
cargo add oxifft --features signal
use oxifft::{hilbert, envelope, Complex};
// Analytic signal + amplitude envelope of a real signal via FFT
let signal: Vec<f64> = (0..1024)
.map(|n| (2.0 * std::f64::consts::PI * 5.0 * n as f64 / 1024.0).sin())
.collect();
let analytic: Vec<Complex<f64>> = hilbert(&signal);
let env: Vec<f64> = envelope(&signal);
println!("envelope[0] = {}", env[0]);
What’s New in 0.1.4
- New
signalprocessing module (featuresignal, needsstd): Hilbert transform and envelope detection, instantaneous phase and frequency, Welch PSD and periodogram, cross-spectral density and magnitude-squared coherence, real and complex cepstrum, minimum-phase reconstruction, and FFT-based resampling. SpectralWindowandWelchConfiggive you explicit control over windowing and Welch segmentation.- Mel-frequency analysis (feature
streaming):build_mel_filterbank(),mel_spectrogram(), andmfcc(), configured throughMelConfig. - New example
signal_processing.rsdemonstrating every function in the signal module end to end. - SIMD codelet refactor:
dft/codelets/simd.rssplit into a focused 5-file directory module, with no change to behavior. - Version bumped 0.1.3 → 0.1.4.
Tips
-
Flip the right feature flag. The classic DSP routines are under
signal, the audio front end understreaming. Enable only what you use:cargo add oxifft --features signalor--features streaming. Thesignalfeature requiresstd, so it is unavailable inno_stdbuilds. -
MFCCs in two lines. For an audio model front end, lean on
MelConfig::default()and askmfcc()for the number of coefficients you want:use oxifft::{mfcc, MelConfig}; let cfg = MelConfig::default(); // sample_rate, fft_size, hop_size, n_mels, f_min, f_max let coeffs: Vec<Vec<f64>> = mfcc(&audio_samples, &cfg, 13); // 13 coefficients per frame -
Tune
WelchConfigfor your tradeoff. Longer segments give finer frequency resolution; more overlap and more segments give a smoother, lower-variance PSD. Pair it with aSpectralWindow(Hann is a safe default) to control spectral leakage. -
Use
resample_to()for sample-rate conversion. Spectral zero-padding upsamples and truncation downsamples, so you skip designing a polyphase filter — ideal when you already have the signal in memory. -
Reach for cepstrum for pitch and deconvolution.
real_cepstrum()is enough for pitch and quefrency analysis; usecomplex_cepstrum()(with its phase unwrapping) andminimum_phase()when you need homomorphic filtering or minimum-phase reconstruction.
The foundation
OxiFFT is the spectral layer of the COOLJAPAN ecosystem. By April 2026 it sits alongside mature siblings — SciRS2 for scientific computing, NumRS2 for arrays, OxiBLAS for linear algebra, OxiWhisper for speech, OxiPhoton, and ToRSh — and signal and audio pipelines across the stack rest on a fast Fourier transform. With 0.1.4, that transform now comes with the DSP and audio-feature layer built on top of it.
Repository: https://github.com/cool-japan/oxifft
Star the repo if a Pure Rust FFT — and now a Pure Rust signal-processing stack — is something you want to build on.
Pure Rust signal processing is here — fast, safe, and sovereign.
— KitaSan at COOLJAPAN OÜ April 11, 2026