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.
§Links
Other helpful Rust FFI discussions:
- The Rust Programming Language’s materials
- the nomicon
- Rust FFI Omnibus
- the Reference’s discussion
- the associated Rust API docs
§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
- Adam Green
- Aleksey Pirogov
- Alexander Kryvomaz
- Alexander Lozada
- Alexander Payne
- Andrew Dirksen
- Andrew Thompson
- Anthony Deschamps
- Anthony Scotti
- Arlen Haftevani
- Arlo (Hyena)
- Arun Kulshreshtha
- Behnam Esfahbod
- Benjamin Manns
- Benjamin Wasty
- Brandon ‘Spanky’ Mills
- Brian Casiello
- Brian Manning
- Brian McCallister
- Bryan Stitt
- Caryn Finkelman
- Cass Costello
- Cat Dad
- Chap Lovejoy
- Charlie Egan
- Chip
- Chris Palmer
- Christoffer Ceutz
- Dan Abrams
- Daniel
- Daniel Bross
- Daniel Collin
- Daniel Mason
- David Carroll
- David Hewson
- Derek Morr
- Doug Reeves
- Douglas Correa
- Edmund Kump
- Eduard Knyshov
- Embark Studios
- Eugene Bulkin
- Evan Stoll
- Fabio (decathorpe)
- Fabio Correa
- Gaveen Prabhasara
- Graham Wihlidal
- Henri Sivonen
- Ian Jones
- Hoàng Đức Hiếu
- Hugo Josefson
- “Jake ““ferris”“ Taylor“
- Jako Danar
- James Cooper
- James Hagans II
- Jason Bowen
- Jendrik Illner
- Jerome Froelich
- Joar Wandborg
- Johan Andersson
- John Rudnick
- Jon
- Jonah
- Jonathan Knapp
- Jonathan Turner
- Joseph Hain
- Joseph Mou
- Joseph Schrag
- Joe Percy
- Justin Ossevoort
- Kai Yao
- Kazutaka Mise
- Keith Gray
- Kilian Rault
- Lee Jenkins
- Luca Schmid
- Luiz Irber
- Lukas Eller
- Malnormalulo
- Martin Heuschober
- Masashi Fujita
- Matt Rudder
- Matthew Brenner
- Matthias Ruszala
- Max Jacobson
- Max R.R. Collada
- Messense Lv
- Micael Bergeron
- Michael Mc Donnell
- Michael Melanson
- Michael Sanders
- Nathan Sculli
- Nick Coish
- Nick Gideo
- Nick Stevens
- Nicolas Pochet
- Oladapo Fadeyi
- Olaf Leidinger
- Oliver Uvman
- Oluseyi Sonaiya
- Ovidiu Curcan
- Pascal
- Patrick O’Doherty
- Paul Naranja
- Paul Osborne
- Peter Scholtens
- Peter Tillemans
- Pierre-Antoine Champin
- Ralph Giles
- Ramon Buckland
- Randy MacLeod
- Raph Levien
- Richard Dallaway
- Rob Tsuk
- Robbie Clarken
- Robert Chrzanowski
- Ryan Blecher
- Ryan Osial
- Scott Moeller
- Sebastián Ramírez Magrí
- Simon Dickson
- Simon G
- Soren Bramer Schmidt
- Steve Jenson
- Steven Knight
- Steven Murawski
- Stuart Hinson
- Tim Brooks
- Tim Süberkrüb
- Tom Prince
- Toolmaker’s Guild
- Ty Overby
- Tyler Harper
- Victor Kruger
- Will Greenberg
- William Roe
- Zak van der Merwe
- Zachary Snyder
- Zach Peters
- Zaki
(Thanks to the couple people donating who opted out of the reward tier, as well. You know who you are!)
§Become a sponsor
§Contact
- New Rustacean:
- Twitter: @newrustacean
- Email: hello@newrustacean.com
- Chris Krycho
- GitHub: chriskrycho
- Twitter: @chriskrycho
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.