Over the past few years there has been a huge amount of interest in bidirectional interoperability between Swift and C++. Thanks to the hard work of zoecarver, egor.zhdan, gribozavr, Michael Forster, Marcel Hlopko, scentini, and many other contributors, the Swift compiler is now able to import and use some C++ APIs, including C++ standard library types like std::string
and std::vector
. Additionally, a C++ interoperability manifesto that describes the goals and the design for the implementation was written and published on github.
To advance the interoperability support between Swift and C++, we are announcing the formation of the Swift and C++ interoperability workgroup as part of the Swift project. This workgroup provides the framework for those interested in Swift and C++ interoperability to work together to refine the interoperability layer's goals and design. Additionally, the workgroup will establish an ongoing discussion about the related Swift compiler changes to implement interoperability support.
Workgroup Details
- The workgroup is responsible for developing and designing the interoperability model between C++ and Swift.
- The workgroup will meet over a video call once a week.
- The workgroup will initially focus its discussion on how to rapidly iterate the development of the interoperability model between the two languages.
- The workgroup complements the existing Swift evolution process. The workgroup will design the interoperability model first, and then will bring it back for formal evaluation and discussion with the Swift community via the Swift evolution process.
Swift Forums
A new "C++ interoperability" sub-section of the "Development" section on the forums, open to everyone , will host the relevant technical discussion posts on C++ interoperability. Alongside technical discussion, it will include meeting notes from the workgroup meetings.
Get Involved!
We would love to hear from anyone interested in joining this workgroup. Those who participate will need to feel comfortable generally meeting the following obligations in terms of commitment:
- Dedicate 50 minutes per week that you can use for the interoperability discussions.
- Actively participate in the work related to the Swift and C++ interoperability project. This can include things like:
- Making code changes in the interoperability layer in the Swift compiler.
- Writing user-facing documentation for this feature.
- Reviewing related PRs and/or proposals.
- Providing design input for mapping specific code patterns between the two languages.
Please let us know if you're interested in this effort and if you'd like to join the workgroup by responding to this forum post below. We are planning on forming the workgroup in the next week or two once we have received the responses from this community. The initial set of participants will include the following community members:
- Zoe Carver (@zoecarver)
- Saleem Abdulrasool (@compnerd)
- Ravi Kandhadai Madhavan (@ravikandhadai)
- Puyan Lotfi (@plotfi)
- Nuri Amari (@nuriamari)
- Josh Learn (@guitard0g)
- Egor Zhdan (@egor.zhdan)
- Dave Abrahams (@dabrahams)
- Daniel Rodríguez Troitiño (@drodriguez)
- Alex Lorenz (@Alex_L )
Alex Lorenz (@Alex_L) will be responsible for setting up the meetings, going through the discussion points, and posting the agenda and the meetings notes on the Swift forums.
Thanks,
Alex