Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
12 November 2024
CXX is an opinionated library that allows mixing C++ and Rust in a safe and idiomatic way. In this step-by-step tutorial, we implement an example application that uses CXX to bridge between C++ and Rust. In the following videos, we will expand on this knowledge to add Qt to the mix with CXX-Qt.
You can also take a look at our other resources to get started with CXX-Qt:
* The CXX-Qt Book: https://kdab.github.io/cxx-qt/book/
* CXX-Qt Github Repository: https://github.com/KDAB/cxx-qt/
* 1.1 Mixing C++ and Rust - Introduction: https://www.youtube.com/watch?v=e4SHDxEEkB8
Example code used in this video:
- https://github.com/KDAB/cxx-qt/tree/main/examples/qml_minimal
- https://github.com/KDABLabs/CXX-Basics-Tutorial
00:00 Welcome
01:14 Project Setup
02:30 Rust Greeting & Language enums
05:42 C++ Greeter class
12:00 CXX Overview
13:45 Trivial Types: Sharing internals between C++ and Rust
17:30 extern "C++": Using C++ from Rust
22:00 extern "Rust": Using Rust from C++
23:30 Building the final app
28:45 Summary & Outro
All 'How to Integrate C++ and Rust' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6jOg_cPqRfXMNriHknKy4VW
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Learn Rust
In collaboration with our partners Ferrous Systems, KDAB provides a variety of introductory and advanced training courses for the Rust language.
Learn more
Learn Modern C++
Our hands-on Modern C++ training courses are designed to quickly familiarize newcomers with the language. They also update professional C++ developers on the latest changes in the language and standard library introduced in recent C++ editions.
Learn more