-
Notifications
You must be signed in to change notification settings - Fork 108
Add support for Embedded Swift #977
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
Tracked internally as rdar://145678965. |
FWIW you don't need to own embedded hardware to test Embedded Swift support in general. Embedded Swift is just as useful for Wasm, and a compatible Wasm runtime is available in any major browser. |
I'm aware Wasm is a valid Embedded Swift target, but I don't think we could reasonably qualify our support for Embedded Swift with just Wasm. We already have affordances for WASI and Wasm in the codebase and they may or may not translate to other platforms/architectures/etc., so we'd want to make sure things work elsewhere too. |
My recommendation would be to consider the ESP32 use-case since this covers all the special cases likely to be encountered in the embedded space. Hardware is also cheaper. I would envision that there are at least three scenarios that need consideration:
Practically speaking, it is likely that teams will need to be able to use more than one of the options above in order to get appropriate coverage, since each approach has different limitations with regard to external dependencies like FreeRTOS libraries or hardware support. This introduces a need for multiple build targets. There are some build-related challenges that creep in too. For example, ESP32-builds are leveraging the IDF build process, so unit tests need to be invoked as part of that build pipeline rather than as per SwiftPM norms. |
Thanks for the suggestion! We have a lot of options for hardware to test on; Raspberry Pi as suggested in the description above is just a well-known example. I suspect it will come down to the preferences and/or budget of each contributor (or that contributor's employer.) |
@grynspan, ESP32 and STM32 are more affordable and widely used in the industry in compare to Raspberry Pi (except for Raspberry Pi Pico). |
As I wrote earlier, Raspberry Pi is just an example and hardware selection is going to be at each contributor's discretion. |
@grynspan Quick question, should I check for Non-allocating Embedded Swift while I'm auditing the code? Or only for the current embedded Swift version? Also, for setting up CI, I'm not sure if I have sufficient access. |
Our code does not build for Embedded Swift yet. We expect (heh) to initially require allocating/locking in our minimum supported configuration. |
@grynspan It is not my intention to frustrate or bother you. Sorry if I did unintentionally. I feel like I misunderstood the scope of the issue. I was auditing the current code base to provide a report, then |
I'm not bothered! There are a number of compiler-side changes we need before we can begin supporting features of Swift Testing in Embedded Swift. This work is not planned for Swift 6.2. If you're interested in contributing I might suggest looking at some of the other open issues we have (especially around alternative platform support if that interests you!) |
Add support for Embedded Swift:
Above and beyond other porting efforts:
The text was updated successfully, but these errors were encountered: