Skip to content
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

[Feature Request] Mixed language(C and Swift) swift_library support #1182

Open
Kyle-Ye opened this issue Mar 25, 2024 · 4 comments
Open

[Feature Request] Mixed language(C and Swift) swift_library support #1182

Kyle-Ye opened this issue Mar 25, 2024 · 4 comments

Comments

@Kyle-Ye
Copy link

Kyle-Ye commented Mar 25, 2024

Swift has a SE to make SwiftPM support it. But it is currently "Returned for Revision".

https://github.com/apple/swift-evolution/blob/main/proposals/0403-swiftpm-mixed-language-targets.md

I was wondering whether we have such feature supported on Bazel currently.

@brentleyjones
Copy link
Collaborator

You can currently use the experimental_mixed_language_library in rules_apple to support this.

If the SE is ever implemented, or maybe before then, I believe we will move that rule into rules_swift and graduate it to non-experimental.

@Kyle-Ye
Copy link
Author

Kyle-Ye commented Mar 25, 2024

Haven't used experimental_mixed_language_library before. But I'd like to use it in Linux and other platforms too. Does it support such use case?

The repo's name "rules_apple" is hinting me that it will only work for Apple's Darwin platform.

@Kyle-Ye
Copy link
Author

Kyle-Ye commented Mar 25, 2024

https://github.com/bazelbuild/rules_apple/blob/700f661876678b98596c4e3106396a9029571469/doc/rules-apple.md#experimental_mixed_language_library

Checking the doc, the rule is about ObjectiveC + Swift. But the SE and my issue is about C and Swift not ObjectiveC specific.

@brentleyjones
Copy link
Collaborator

The version that gets added to rules_swift would need to support C. For now you can probably write your own macro that uses cc_library instead of objc_library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants