-
Notifications
You must be signed in to change notification settings - Fork 65
C++ Interop Example #139
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
Yeah this would be a good thing to include in an example attached to the integrate with zephyr guide in #140 |
This seems interesting, @ADKaster do you want a crack at adding the example to the document or shall I have a look later? |
@xtremekforever if my example worked, I wouldn't mind taking a crack at cleaning it up for use in your examples here. However, it doesn't quite build and I don't know enough about zephyr to fix all the compile errors I was seeing that are unrelated to Swift. They were mostly related to trying to use C++ in zephyr. Perhaps a non-zephyr example would be easier to handle? I will note that the CMake files in my example repo are modified versions of what @etcwilde maintains at https://github.com/apple/swift-cmake-examples/tree/main/3_bidirectional_cxx_interop. |
Also iirc I filed swiftlang/swift#80570 while playing with this example. Evan's CMake scripts attempt to extract information about target-specific include dirs and lib dirs from Relevant script lines: |
Oh okay, I thought the example was something that was already working. I could see a simple C++ interop example with embedded Swift could be more useful |
I took a crack at trying to create an example project for including a Swift library as a dependency to an existing C++ Zephyr project. Well by "existing" I mean, the app main is a C++ file, not that I have an existing Zephyr project to integrate with.
That example lives here: https://github.com/ADKaster/swift-embedded-export-zephyr
I based it off of some of the examples in this repository for Zephyr.
It's possible that "Zephyr + C++" is too tricky of a target to create this interop example for embedded from. But I doubt that this is a problem unique to me.
Would an example in a different operating environment be a good fit for this repo?
The text was updated successfully, but these errors were encountered: