Overview
Explore the intricacies of Rust's Foreign Function Interface (FFI) in this 37-minute conference talk from Rust Hungary. Dive into the complexities of interfacing Rust with other programming languages, covering topics such as ownership, borrowing, and memory management across language boundaries. Learn how to effectively pass vectors, slices, and strings between Rust and external functions. Discover the nuances of working with CStr and CString, and understand the challenges of dealing with asynchronous functions and futures in FFI contexts. Gain practical insights from hands-on experience as the speaker, a Rust engineer, guides you through various FFI scenarios and best practices.
Syllabus
Introduction
What is it about?
Primitives in FFI
Structures
Opaque pointers
Borrowing and ownership
Vectors
Slices
Strings
Corresponding string types
Borrowing with callbacks
Asynchronous functions (including futures)
Summary
Taught by
Rust