TL;DR
Get the latest gadgets delivered free with Prime
- Fast, free delivery on millions of items
- Prime Video, Amazon Music and more included
- Member-only deals all year
A developer has built a minimal kernel in Embedded Swift and run it on QEMU’s ARM virtual machine. The experiment currently prints a message and then waits; it is a learning project, not an attempt to replace an operating system.
A developer has built a minimal kernel in Embedded Swift and run it on QEMU’s ARM-based virtual machine, demonstrating a small Swift program starting without an operating system underneath it. The kernel’s current task is limited: it prints a message through QEMU and then waits indefinitely, making the project a technical experiment rather than a general-purpose operating system.
The report describes using Embedded Swift, a subset intended for environments without an operating system or the standard library in its usual form. The author first tested a small program, then moved to a bare-metal target named aarch64-none-none-elf, which describes a 64-bit ARM machine without an operating system or C runtime. The test machine is an Apple Silicon system, and QEMU’s virt machine provides the emulated hardware.
Because a bare-metal machine does not start a program like a conventional desktop application, the project adds a small assembly boot file. It defines the _start entry point, sets up a stack for the first CPU core, and calls a Swift function named kernel_main. The assembly code parks secondary cores in a wait loop; the Swift entry function prints the message and then also remains in an infinite loop.
The author says the first build attempt exposed missing platform support: with no operating system or C library, functions such as putchar and memmove are not supplied automatically. The linker also required a script that explicitly handles the sections kept in the executable. The report describes addressing the setup issues and implementing support needed for output; the provided source excerpt ends during that explanation, so it does not give the full implementation details.
What Bare-Metal Swift Requires
The experiment illustrates the gap between compiling Swift code and starting it on a machine with no runtime environment. The developer must provide or account for startup code, a stack, linker configuration, and services that an operating system and standard library would normally make available. That makes the project useful as a small demonstration of what the language needs at the boundary between Swift and low-level system code.
For readers interested in Swift beyond applications, the report offers a concrete example of Embedded Swift’s intended area: constrained or operating-system-free environments. Its present scope should not be overstated. A program that prints once and waits does not establish support for ordinary kernel functions such as device management, scheduling, storage, or networking. The author explicitly frames it as a way to learn, not a replacement for Linux or another established kernel.
As an affiliate, we earn on qualifying purchases.
From Swift Program to QEMU Boot
The author began with a minimal Swift package and a one-line print program. The regular installed compiler could not load the Embedded Swift standard library for the initial target, according to the report. The author then installed a development toolchain and successfully compiled and ran the small test. The report notes that Embedded Swift was experimental and not yet supported in public Swift releases at the time described.
Moving from that test to QEMU required a different kind of build. The project uses compiler and linker options to avoid standard libraries, produce a static bare-metal executable, and apply a custom linker script. In a September 28, 2026 update, the author said Max Desiatov had suggested using Swift’s @c attribute for the entry function instead of @_cdecl. The author updated the post and code, describing @c as formalizing the existing C-function interoperation approach.
“The goal is obviously not to replace Linux or any other popular kernel, but just to have fun and understand what is required to make a program run without an operating system underneath it.”
— The project author
As an affiliate, we earn on qualifying purchases.
Limits of the Demonstration
The source establishes a narrow demonstration, but it does not describe a broader set of kernel capabilities or provide evidence that the project has been tested on physical hardware. It is also unclear from the supplied report excerpt exactly how the output routine is implemented after the discussion of missing C library functions. The project’s current status beyond printing and waiting, including any later development, is not established here.
The report describes Embedded Swift as experimental and says a development toolchain was needed. Compiler and toolchain support can change, so the account should be read as a report of the setup used for this experiment, not a statement that every public Swift release can build the same kernel. The source also does not provide comparative performance measurements or claim that Swift is ready for production kernel development.
As an affiliate, we earn on qualifying purchases.
Further Steps for the Kernel
The report does not announce a release schedule or a specific next milestone. The immediate technical basis is in place for further experiments: a QEMU boot path, a Swift entry function, and a mechanism for printing a message. Any expansion—such as handling more hardware features or adding operating-system services—would go beyond the functionality confirmed in the account.
Readers following the project can look for changes to its code and build instructions, especially as Embedded Swift and its toolchain develop. Until the author reports additional capabilities, the confirmed result remains a minimal kernel that starts in QEMU, prints, and waits.
As an affiliate, we earn on qualifying purchases.
Key Questions
What does the Swift kernel do?
It starts in QEMU, prints a message, and then waits in an infinite loop. The report does not describe a broader operating-system feature set.
Does the project replace Linux?
No. The author says the project is a learning experiment and is not intended to replace Linux or another popular kernel.
Why does the project need assembly?
The machine needs a defined startup path before it can call Swift code. The assembly establishes _start, sets a stack for the first core, and calls the Swift entry function.
Why was a development Swift toolchain used?
The author reports that the installed compiler could not load the Embedded Swift standard library for the initial test. The report says Embedded Swift was experimental and required a development toolchain at the time.
Has the kernel been shown running on physical hardware?
The supplied report describes running it in QEMU on an Apple Silicon host. It does not establish that the kernel has been tested on physical hardware.
Source: hn
Halloween Picks
halloween
As an affiliate, we earn on qualifying purchases.
