Rust Runtime Contracts Can Be Free in Release Builds, but the Compiler Won't Do It for You
Rust strips debug assertions automatically, but real design-by-contract needs more than debug_assert!.
Rust can enforce runtime contracts in development and erase them completely from release builds. The catch is that the language does not treat contracts as a…