fesoliveira014 / voronator-rs

Delaunay triangulation and Voronoi diagram generation. Ported from Mapbox's Delaunator and d3-voronoi
MIT License
54 stars 13 forks source link

Fix #12 - Make rayon optional with maybe_parallel_iterator. #13

Closed finnbear closed 2 years ago

finnbear commented 2 years ago

This PR introduces a dependency on maybe_parallel_iterator to make rayon optional, adding much better support for WebAssembly. The default is to use rayon, matching the old behavior. Clients can pass default-features=false in their Cargo.toml to avoid it.

Full disclosure: I am the author of maybe_parallel_iterator, which is currently a wrapper around rayon.

Fixes #12

fesoliveira014 commented 2 years ago

Thanks for this, looks good to me.