140 Bugs Were Hiding in One Function, and My Tests Couldn't See Any of Them
A Python library (textdistance) was ported to Rust (textdistance-rs). The porting process was relatively quick, but the real challenge was ensuring the new code behaved the same as the old code across various algorithms and edge cases. The author chose to use a JSON pipe to communicate between the Rust code and the existing Python test suite, rather than using PyO3. This allowed for easier debugging and replaying of failing cases.