-
Notifications
You must be signed in to change notification settings - Fork 149
Add example of Swift <--> C++ interop #1198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes please! I just tried this out and was pleasantly surprised at how easy it was. Here are some quick notes based on my experience in case anyone else sees this before the examples come out. BUILD
SWIFT lib.swift
C++
|
It would be great to have an example of the other way around: calling C++ code from Swift. This will make it easier for developers to utilize C++ libraries in Swift code. |
Just put up a PR to add a basic example to show how to invoke C++ code from Swift: #1280 |
@brentleyjones I just whipped up a short example of calling Swift from C++ (the first part of the Mountain Peak example). Should I put up a PR to include it in the examples? |
Does it add anything more than 321d2c3? If so, yes. |
In the last year, Swift has gradually gained the ability to interop with C++.
rules_swift
should add a minimal example on how that would work. It would provide at baseline a means by which we can easily reproduce issues (module naming, static and dynamic linking, ODR violations, etc) as they are discovered.The text was updated successfully, but these errors were encountered: