Safe Parsers in Rust: Changing the World Step by Step
Geoffroy Couprie and Pierre Chifflier
Parsers are critical parts of applications, exposed to potentially malicious data but also plagued by the same bugs over a period of years, like memory-related problems. Solutions exist but are often not adopted: many of them require rewriting entire software packages. We describe how to leverage Rust’s safety features and close integration with C, the strength of the nom  parser combinators library, along with a thorough methodology  to make existing software much more secure by rewriting critical parts. By surgically replacing functions, we intend to initiate a change towards robust and memory-safe parsers.