Safety in an unsafe world
Summary
This post analyzes Netstack3, a Rust-based networking stack, focusing on safety patterns that go beyond memory safety. It presents two examples—thread safety via a Send trait and deadlock prevention via a compile-time lock-order graph—and argues that Rust libraries can and should provide strong safety guarantees. The piece advocates a framework where safety is defined, enforced, and consumed to achieve robust, scalable software.