Embedded Swift brings the safety and expressivity of Swift to constrained environments. Explore how Embedded Swift runs on a variety of microcontrollers through a demonstration using an off-the-shelf Matter device. Learn how the Embedded Swift subset packs the benefits of Swift into a tiny footprint with no runtime, and discover plenty of resources to start your own Embedded Swift adventure.
Discuss this video on the Apple Developer Forums:
https://forums.swift.org/c/development/embedded/107
https://developer.apple.com/forums/topics/programming-languages-topic?cid=yt-w-0011
Explore related documentation, sample code, and more:
Embedded Swift User Manual: https://github.com/apple/swift/blob/main/docs/EmbeddedSwift/UserManual.md
A Vision for Embedded Swift: https://github.com/apple/swift-evolution/blob/main/visions/embedded-swift.md
Swift Embedded Example Projects: https://github.com/apple/swift-embedded-examples
Swift Matter Examples: https://github.com/apple/swift-matter-examples
Tools used: Neovim: https://neovim.io
Swift MMIO: https://github.com/apple/swift-mmio
Add support for Matter in your smart home app: https://developer.apple.com/videos/play/wwdc2021/10298
00:00 - Introduction
00:25 - Agenda
00:46 - Why Embedded Swift
02:30 - Showcase
02:47 - The plan
03:39 - Getting started
06:19 - Using Swift's interoperability to control the LED
07:12 - Using an ergonomic LED struct
10:07 - Adding the Matter protocol
13:43 - Using a Swift enum in the event handler
16:52 - Demo summary
17:34 - How Embedded Swift differs
19:48 - Explore more
21:32 - Wrap up
More Apple Developer resources:
Video sessions: https://apple.co/VideoSessions
Documentation: https://apple.co/DeveloperDocs
Forums: https://apple.co/DeveloperForums
App: https://apple.co/DeveloperApp