JCash/voronoi ? reverse-engineered prompt

Reverse engineered prompt

Build me a small, fast C library for generating 2D Voronoi diagrams from a set of points, with Delaunay support too if it fits naturally.

I want it to be easy to drop into another project as a single header, with no external dependencies, and it should work on macOS, Linux, and Windows. Please include a simple example app that can read or generate points, build the diagram, and export the result to SVG or PNG so I can see it working right away. If it makes sense, also add a basic JavaScript and WebAssembly wrapper so the same core logic can run in the browser.

Keep the code clean and readable, make it robust with clipped edges and usable cell data, and include tests or example outputs so I can verify it behaves correctly. Use current docs online if you need to check best practices for the build setup.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab