Skip to content

Generate Embedded Swift SDK for WASI #208

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

Merged
merged 9 commits into from
May 15, 2025
Merged

Generate Embedded Swift SDK for WASI #208

merged 9 commits into from
May 15, 2025

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented May 14, 2025

This allows targeting WASI with Embedded Swift, enabling use of a subset of Swift Concurrency in this mode, and also hiding most if not all of unsafe flags in toolsets. This way, users of Embedded Swift can build their packages with a similar swift build --swift-sdk command as the rest of users of WASI.

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov changed the title Add support for Embedded Swift in Swift SDK for WASI Generate Embedded Swift SDK for WASI May 15, 2025
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov marked this pull request as ready for review May 15, 2025 11:49
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@euanh this might be interesting for you as we potentially could do the same with for Linux. IDK how well Embedded Swift works with Glibc, but certainly should be possible with Musl.

@MaxDesiatov MaxDesiatov added the enhancement New feature or request label May 15, 2025
@MaxDesiatov MaxDesiatov requested a review from bnbarham May 15, 2025 11:54
@euanh
Copy link
Contributor

euanh commented May 15, 2025

@euanh this might be interesting for you as we potentially could do the same with for Linux. IDK how well Embedded Swift works with Glibc, but certainly should be possible with Musl.

That's an interesting idea! Definitely worth trying it. It looks like the main functional change here is adding extra compiler flags. Is that right?

@MaxDesiatov
Copy link
Contributor Author

MaxDesiatov commented May 15, 2025

Yes, also adding one more Swift SDK with its own metadata and its own toolset within the same bundle. As a lot of directories overlap between embedded and non-embedded and can be reused, we rely on this recent SwiftPM change to enable that swiftlang/swift-package-manager#8638

@euanh
Copy link
Contributor

euanh commented May 15, 2025

swiftlang/swift-package-manager#8638 is a nice improvement. 🎉

@MaxDesiatov MaxDesiatov merged commit fc7da52 into main May 15, 2025
20 checks passed
@MaxDesiatov MaxDesiatov deleted the maxd/embedded-wasi branch May 15, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants