Rust interop guide
Talking to Rust from other languages (and vice versa)
What does it actually take to make new Rust code talk directly to your existing software?
This series of blog posts can help you to introduce Rust into your codebase step by step, whether it's C, C++, Python, Node.js, Java, or JavaScript.
June 6, 2024
Mix in Rust
What does it actually mean to introduce Rust in an existing project, and having it communicate with other languages in the code base? This article launches a series of blog posts that provide guidance for introducing Rust into your code base step by step.
Henk
Embedded software engineer
June 7, 2024
Mix in Rust with C
So, you've just read my previous post on Rust interoperability in general, and now you're curious about how to actually apply the concepts to your situation. You've come to the right place, because in this post and the two that follow, I'll demonstrate how to make Rust and C talk to each other.
Henk
Embedded software engineer
The other day I came across Diplomat, an opinionated tool that makes a lot of choices for you. If you've read my previous post in this series, you'll have seen that that can be quite valuable. If you haven't read the previous article yet, do so before continuing to read this one, as it'll help you appreciate the concepts in this post, and it introduces the example as well.
Henk
Embedded software engineer
July 15, 2024
Mix in C with Rust: A taste of C in your Rust
Can't wait to learn how to call C code from your Rust project after reading my previous posts about Rust interop in general and calling Rust from C? Good! If you haven't read those yet, please do, because I'm going to assume you have in this article. We've seen the basics of Rust's FFI, and have experimented with calling Rust from C. Going the other way around, you'll walk into much the same challenges.
Henk
Embedded software engineer
August 27, 2024
Mix in Rust with Python: PyO3
In this article, we'll dive into combining Rust with Python. Specifically, this post covers calling modules written in Rust from Python scripts.
Henk
Embedded software engineer
September 17, 2024
Mix in Rust with C++
This article will help you to slowly introduce some Rust into your C++ project. We'll familiarize ourselves with the tooling and go through some examples.
Henk
Embedded software engineer
September 30, 2024
Rust interop in practice: speaking Python and Javascript
We've been writing how-tos about using Rust in existing C, Python, and C++ projects, but this article shows you an in-production example of Rust interoperability: Recently I worked on exposing the TSP Rust API to Python and NodeJS users.
Folkert
Systems software engineer
Meet the contributors
Henk
Embedded software engineer
Henk is an embedded Rust expert, who loves teaching others his trade.
Tamme
Embedded software engineer
Tamme is an embedded expert with extensive C++ experience.
Marc
Software engineer
Marc is an expert in C and secure systems programming.
Folkert
Systems software engineer
Folkert is an expert in systems programming and linguistics.
Support us
Donations and sponsoring are essential for us to maintain and extend our interop guide and other education projects like teach-rs. Contact us at donate@tweedegolf.com if you want to support our work.
Get professional assistance!
Our engineers are Rust experts and have ample experience designing and building software for systems, web and embedded platforms.
They can train your team, lead your team, work as part of your team (team augmentation) or take entire projects off your hands.
Check out our training and engineering services to find out how we can help you introduce Rust in your existing projects. Or get in touch with any questions.