I wrote Rust bindings for the single-header WFC library by krychu. My bindings can be found here. I plan to keep them up to date when the C library changes, but it may lag behind some.

I find this implementation of WFC, Wave Function Collapse, to be a particularly simple and easy to use API, as well as easy to integrate into a project as a single header file. I wrote the bindings manually to reduce development dependencies, and because the bindgen tools weren't working for me, but this is very easy for a small API. I did a little Rusty wrapping, but not much, to expose an API with no 'unsafe' functions.

I had planned on one day implementing WFC myself in C, based on the very nice discussion in the paper WaveFunctionCollapse is Constraint Solving in the Wild. I never finished this project, and I'm glad to see someone else make a much nicer and more complete implementation than I ever planned to do.

Previously in our game I was using the wfc crate and some of its associated crates. These crates are very general and powerful, but have a huge number of dependencies. Removing this crate and replacing it with my bindings to the C library removed around 45 dependencies, a full 1/3 of all dependencies of the game. For my use case I really just need a way to generate levels based on a seed, so this is a great improvement.

If you are looking for a small, quick WFC algorithm in Rust, and you don't mind depending on C, check out my bindings. The real credit goes to kychu for the C library itself.