Skip to content

Optional parallel feature (make rayon opt-out) #85

@Fieldnote-Echo

Description

@Fieldnote-Echo

Summary

Add a default-on parallel feature. When disabled, swap the par_chunks(_mut) / par_iter calls (in rank.rs, quant.rs, bitmap.rs, sign_bitmap.rs, fastscan.rs, multi_bucket.rs) for a single-threaded path, so callers in single-threaded WASM or thread-pool-averse environments can drop the rayon dependency.

⚠️ Scope correction

The external review framed this as "rayon is the only thing blocking no_std." That's not accurate. Every index type's write / load uses std::fs / std::io / std::path (e.g. src/bitmap.rs:408, src/rank.rs:506, src/sign_bitmap.rs:224). Full no_std would additionally require gating the entire persistence surface behind a std feature and auditing the rest of the crate.

This issue is scoped to making rayon optional only. A true no_std + alloc build is a separate, larger design discussion (and intersects the ROADMAP edge/WASM goals — worth its own issue if we want to pursue it).

Acceptance

  • parallel feature (on by default); disabling it builds + tests green with no rayon in the tree
  • Serial path produces identical results (determinism preserved)

Filed from an external technical review (May 2026); scope corrected and verified against v0.2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions