# earcut-rs
[](https://github.com/MIERUNE/earcut-rs/actions/workflows/Test.yml)
[](https://codecov.io/gh/MIERUNE/earcut-rs)
[](https://crates.io/crates/earcut)
A Rust port of the [mapbox/earcut](https://github.com/mapbox/earcut) polygon triangulation library, implemented from scratch with some reference to [donbright/earcutr](https://github.com/donbright/earcutr).
- Based on the latest earcut 2.2.4 release.
- Designed to avoid unnecessary memory allocations. You can reuse the internal buffer and the output index vector.
- (Experimental) An additional module, `utils3d`, can rotate polygons from 3D to 2D space before triangulation.
- License: ISC
<p align="center">
<img src="./docs/image.png" width="300">
</p>