PYTHON-5683ClosedDone
Spike: Investigate using Rust for Extension Modules
h3. *Context* Our Python C Extension modules are difficult to maintain and require vigilance to avoid memory leaks. We should investigate using Rust for the existing C extensions. We could wrap the Rust [BSON crate|https://docs.rs/bson/latest/bson] for the heavy lifting in our BSON code, and do a straight port of our cmessagemodule code. In the spike we would need to wrap a subset of the BSON types and compare the encode/decode performance of the Rust version to the CPython version. h