# par-core & par-iter: Switchable parallelization for Rust

> tl;dr:
> 
> I forked `rayon` to allow switching parallelization library or disable parallelization. See [par-iter](https://docs.rs/par-iter) and [par-core](https://docs.rs/par-core).

I'm the creator of [the SWC project](https://swc.rs). I've been using `chili` the SWC Minifier. `chili` is a parallelization library with a heartbeat scheduling algorithm. I found that it performs far better than `rayon` for my usecase. But it lacks an API like parallel iterators of `rayon`. Additionally, I need to use different parallelization libraries for `next.js` or `rspack` and disable parallelism for Wasm targets. So I forked `rayon` and named it [par-iter](https://docs.rs/par-iter). [`par-iter`](https://docs.rs/par-iter) is based on [`par-core`](https://docs.rs/par-core/), which allows selecting `rayon` or `chili` for parallelism or even disabling parallelism using cargo features.

I prefer to get it merged back to `rayon` , so I filed [an issue on the rayon issue tracker to ask if they are open to PR for it](https://github.com/rayon-rs/rayon/issues/1235), but I don't think it's likely, considering the package name.

Any ideas, thoughts, and feedback are welcome!
