-
Book Overview & Buying
-
Table Of Contents
Rust for C++ Developers
By :
We've been focusing specifically on Rust for a few chapters, but now it's time to delve back into C++. While ideally, all our software would be able to benefit from Rust's safety guarantees, the reality remains that there are many libraries written in C and C++ that we may wish to use as part of our Rust programs. Or, perhaps we want to leverage Rust inside a completely different programming language ecosystem. Whether we're replacing an older system with Rust piece by piece or creating extensions for a third language such as Python, understanding how to use Rust to interact with other languages is an essential skill.
In this chapter, we'll discover Rust's Foreign Function Interface (FFI). The FFI refers to the set of language features that allow us to call functions from other languages in our Rust code and to make our Rust functions and data types available to other languages.
In this chapter, we're going...