1. 3
  1.  

  2. 1

    I’ve found wrapping C APIs works really well. Rust can’t magically make the underlying C code safer, but it can protect it from being used incorrectly. Common rules like “a call to set() will invalidate pointers previously returned by get()” or “don’t call read() after calling close()” can be expressed in Rust using the type system.