ruststft 0.4.0

Short-time Fourier transform (STFT) and inverse STFT: streaming and batch spectrograms, a rich window library, mel spectrograms and MFCCs.
Documentation
# ruststft task runner
# https://taskfile.dev
version: '3'

vars:
  MSRV: '1.85'

tasks:
  default:
    desc: List available tasks
    cmds:
      - task --list --sort=none
    silent: true

  fmt:
    desc: Format all Rust sources
    aliases: [format]
    preconditions:
      - sh: command -v cargo
        msg: "cargo not found — install Rust from https://rustup.rs/"
    cmds:
      - cargo fmt --all

  fmt:check:
    desc: Check formatting without modifying files
    cmds:
      - cargo fmt --all -- --check

  lint:
    desc: Run clippy with all features (warnings as errors)
    aliases: [lint:check]
    cmds:
      - cargo clippy --all-targets --all-features -- -D warnings

  lint:fix:
    desc: Auto-fix clippy lints, then format
    aliases: [fix]
    cmds:
      - cargo clippy --all-targets --all-features --fix --allow-dirty --allow-staged
      - task: fmt

  check:
    desc: Type-check (all features) and verify formatting
    cmds:
      - cargo check --all-targets --all-features
      - task: fmt:check

  check:no-std:
    desc: Verify the crate builds without std (no default features)
    cmds:
      - cargo check --no-default-features
      - cargo check --no-default-features --features mel

  build:
    desc: Build with default features (debug)
    cmds:
      - cargo build --all-targets

  build:release:
    desc: Build with all features (release)
    cmds:
      - cargo build --release --all-features

  test:
    desc: Run the test suite with all features
    cmds:
      - cargo test --all-targets --all-features {{.CLI_ARGS}}

  test:doc:
    desc: Run doctests
    cmds:
      - cargo test --doc --all-features

  test:no-std:
    desc: Build the library without default features (the no_std subset; the
      FFT processors and integration tests require std)
    cmds:
      - cargo build --lib --no-default-features {{.CLI_ARGS}}
      - cargo build --lib --no-default-features --features mel,serde

  bench:
    desc: Run the criterion benchmarks
    cmds:
      - cargo bench --all-features {{.CLI_ARGS}}

  fuzz:list:
    desc: List the available fuzz targets
    cmds:
      - cargo +nightly fuzz list

  fuzz:build:
    desc: Build all libFuzzer targets (requires nightly + cargo-fuzz)
    preconditions:
      - sh: command -v cargo-fuzz
        msg: "cargo-fuzz not found — cargo install cargo-fuzz"
      - sh: rustup toolchain list | grep -q nightly
        msg: "nightly toolchain required — rustup toolchain install nightly"
    cmds:
      - cargo +nightly fuzz build

  fuzz:run:
    desc: 'Run one target, e.g. task fuzz:run -- stft_roundtrip -- -max_total_time=60'
    cmds:
      - cargo +nightly fuzz run {{.CLI_ARGS}}

  fuzz:smoke:
    desc: Briefly run every fuzz target (panic check, CI-friendly)
    deps: [fuzz:build]
    cmds:
      - for: ['stft_roundtrip', 'stft_config', 'window']
        cmd: cargo +nightly fuzz run {{.ITEM}} -- -max_total_time=30 -print_final_stats=1

  doc:
    desc: Build rustdoc with all features (docs.rs config)
    aliases: [docs]
    env:
      RUSTDOCFLAGS: '--cfg docsrs'
    cmds:
      - cargo doc --no-deps --all-features

  doc:open:
    desc: Build and open rustdoc in the browser
    aliases: [docs:open]
    env:
      RUSTDOCFLAGS: '--cfg docsrs'
    cmds:
      - cargo doc --no-deps --all-features --open

  msrv:
    desc: Verify the crate builds on the declared MSRV ({{.MSRV}})
    preconditions:
      - sh: rustup toolchain list | grep -q '{{.MSRV}}'
        msg: "Rust {{.MSRV}} toolchain required — rustup toolchain install {{.MSRV}}"
    cmds:
      - cargo +{{.MSRV}} build --all-features

  clean:
    desc: Remove build artifacts
    status:
      - test ! -d target
    cmds:
      - cargo clean

  ci:
    desc: Run the full CI sequence (format check, lint, no-std, tests, doctests)
    cmds:
      - task: fmt:check
      - task: lint
      - task: check:no-std
      - task: test
      - task: test:doc