Architectural patterns

  • Modular interop - a high level approach for ensuring effective interop
  • Layered library design - how to structure libraries and crates for interop
  • -sys crate
  • Wrap a C library
  • Serialization
  • Cross-language ownership

Design patterns

  • Foreign dtor
  • Object-based API (
  • Rust version of C object
  • Something about intermediate types like CString/OsString (,
  • Transparent smart pointer
  • Consolidated wrapper (
  • Strings (how to actually use them, see strings links above,, )

Programming idioms and best practices

  • Representing Rust errors in C (
  • Representing C errors in Rust


  • Disguising pointers as values (unclear, disguises unsafety)
  • Using C structs directly in Rust (back compat hazards including padding, due to different back compat between C and Rust)