Module show_notes::e029

source ·
Expand description

I’m Out to C

  • Date: April 3, 2019
  • Subject: Using Rust’s Foreign Function Interface (FFI) with C!
  • download mp3
  • script

§Show Notes

The code samples here directly match the things I described in the show, so you will likely want to look at add and ffi::add, then Point, translate, and ffi::translate in that order.

Other helpful Rust FFI discussions:

§Sponsors

Thanks to Manning for sponsoring the show and giving all of you a 40%-off discount on their whole store (but especially Carol Nichols’ and Jake Goulding’s Rust in Motion video content and the Rust in Action MEAP!) at deals.manning.com/new-rustacean

§Patreon Sponsors

(Thanks to the couple people donating who opted out of the reward tier, as well. You know who you are!)

§Become a sponsor

§Contact

Modules§

  • ffi 🔒
    The module with all the unsafe code in it! You’ll want to poke at this!

Structs§

  • An example of a slightly more complex data structure we can use with FFI.
  • e029: I’m Out To C

Functions§

  • A safe interface for the unsafe ffi::add.
  • A safe interface for the unsafe ffi::translate function.