c++ swift integration
Asked on 2025-12-17
1 search
To learn about C++ and Swift integration, you should check out the session titled "Safely mix C, C++, and Swift" from WWDC 2025. This session covers how to ensure Swift can safely interact with C and C++ APIs, including adding annotations to make these interactions safer. It also discusses new features in Swift 6.2 that help catch calls to unsafe C and C++ functions. You can find more details in the following chapters of the session:
- Introduction
- Finding unsafe call in Swift
- Calling C/C++ safely
- Functions taking pointers
- Functions returning pointers
- Importing custom types
- Improving safety of C/C++
These chapters will provide you with a comprehensive understanding of how to integrate C++ with Swift safely.

Safely mix C, C++, and Swift
Learn how to mix C, C++, and Swift while improving the safety of your apps. We’ll show you how to find where unsafe C and C++ APIs are called in your Swift code, how to call them more safely, and how to make your app’s existing C and C++ code safer by default.

Explore Swift and Java interoperability
Learn how you can mix Swift and Java in a single codebase. We’ll introduce the swift-java interoperability project, which allows you to use Swift in Java programs or vice versa. We’ll show you how to use the tools and libraries offered by swift-java to write safe and performant code that interoperates between these two runtimes.

What’s new in Swift
Join us for an update on Swift. We’ll briefly go through a history of Swift over the past decade, and show you how the community has grown through workgroups, expanded the package ecosystem, and increased platform support. We’ll introduce you to a new language mode that achieves data-race safety by default, and a language subset that lets you run Swift on highly constrained systems. We’ll also explore some language updates including noncopyable types, typed throws, and improved C++ interoperability.
