Embedded | Swift.org
Create embedded software with Swift
Develop efficient, reliable firmware for devices like microcontrollers
Safe<br>Eliminate buffer overruns and null‑pointer crashes at compile time, keeping your firmware dependable and robust.
Interoperable<br>Reuse existing C/C++ drivers and SDKs with zero wrappers or runtime glue, integrating in minutes.
Tiny<br>Produce meaningful programs measured in kilobytes that are capable of running on constrained devices with no hidden overhead.
Get Started
Runs on many embedded platforms
Integrate with Raspberry Pi Pico SDK<br>Take advantage of seamless interoperatibility and use existing APIs from the Pico SDK directly from your Swift code.<br>Open guide
Go baremetal on STM32 chips<br>For maximum control, you can run completely baremetal and use Swift MMIO to operate hardware devices.<br>Open guide
Embedded Swift is not limited to specific hardware devices or platforms. It's versatile, it can be integrated with existing SDKs and build systems, and it can also be used for pure baremetal development. Most common ARM and RISC-V chips can be targeted by the Swift toolchain.
Learn more about integration with other platforms and build systems
Explore example projects
Harmony Bluetooth Speaker<br>Build a Bluetooth speaker with a ferrofluid visualizer using the Raspberry Pi Pico W.<br>Learn more
Matter and HomeKit Smart Light<br>Implement a Matter smart light accessory that can be used from HomeKit, using an ESP32 microcontroller.<br>Learn more
Interactive UI Examples<br>Build projects using the popular embedded graphics library LVGL on an STM32 board for rich UI and touch input.<br>Learn more
PlaydateKit<br>Create interactive games using PlaydateKit, which provides an easy to use Swift bindings for the Playdate gaming console.<br>Learn more
Explore more Embedded Swift examples and templates on Github
Dive into Embedded Swift
Explore how Embedded Swift tailors Swift’s features like generics, protocols, and async/await into a firmware‑optimized compilation mode that produces compact binaries with predictable performance for bare‑metal devices.
Learn more
Read the blog
Get Started with Embedded Swift on Microcontrollers<br>Discover how Swift runs on ARM and RISC-V microcontrollers with real-world examples using the new Embedded Swift compilation mode.<br>Read more
Byte-sized Swift: Building Tiny Games for the Playdate<br>Learn how Swift was used to build tiny games on the Playdate, with full source, hardware demos, and a deep dive into Embedded Swift.<br>Read more
Read more
Ergonomic and performant
Access hardware registers confidently with Swift-MMIO’s type-safe, expressive API. Your Swift code compiles into minimal, efficient machine code—providing the power and correctness embedded developers need.
Learn more
Squeeze into the smallest places
In just 788 bytes of resulting compiled code, Embedded Swift powers Conway’s Game of Life on the Playdate handheld—melding high‑level abstractions with low‑level bit‑twiddling for real‑time animation.
Learn more
/// Updates each pixel of the current row based on<br>/// the surrounding rows in the previous frame.<br>func update(above: Row, current: Row, below: Row) {<br>var byte: UInt8 = 0<br>var bitPosition: UInt8 = 0x80<br>for column in 0..Frame.columns {<br>let sum = above.sum(at: column)<br>+ current.middleSum(at: column)<br>+ below.sum(at: column)<br>let isOn = current.isOn(at: column)<br>if sum == 3 || (isOn && sum == 2) {<br>byte |= bitPosition<br>bitPosition >>= 1<br>if bitPosition == 0 {<br>self[Int(column / 8)] = ~byte<br>byte = 0<br>bitPosition = 0x80
Learn more
Documentation
Embedded Swift documentation
Getting started with Embedded Swift
Embedded Swift vision document
Embedded Swift example projects
Talks
Go Small With Embedded Swift
Build a Music Visualizer
Why Swift is the Next Big Thing for IoT
Community
Embedded category on Swift forums
Embedded Swift community hour
Copyright © 2026 Apple Inc. All rights reserved.
Swift and the Swift logo are trademarks of Apple Inc.