Implementation of mosaic-reference in Rust originally written by Antonio32A.
This has the same algorithm and functionality as the TypeScript reference project, but it's optimized.
This is still very experimental and needs to be tested before using in production.
I'm also somewhat new to Rust, so some code can definitely be improved.