Embedded Swift
Swift on microcontrollers and bare-metal targets.
Embedded Swift brings the language to microcontrollers and other resource-constrained environments without the standard library overhead. This workstream tracks board support, examples, and the evolution of the Embedded language mode itself.
Topics
- Toolchain setup for ARM Cortex-M and RISC-V boards
- Memory and binary-size guidelines
- Hardware peripheral examples and FFI bindings
From swift.org
Embedded Swift is a first-class compilation mode in the official Swift toolchain. The canonical resources are:
- Get started with Embedded Swift — swift.org’s landing page for Embedded Swift, including microcontroller examples and recommended next steps.
- Embedded Swift documentation — the full reference, including ways to get started on real hardware.
swift-embedded-examples— official sample projects for ARM Cortex-M, RISC-V, the Raspberry Pi Pico (RP2040), STM32, ESP32, nRF, and more.- Embedded Swift vision document — the design rationale for the Embedded Swift language subset.