Get the latest tech news

A minimal kernel in Swift, running in QEMU


Update (28th of September 2026) Max Desiatov told me that the @c swift attribute should work, instead of declaring the functions using @_cdecl. The @c attribute marks a global function as a C function implemented in Swift, which formalizes the @_cdecl attribute. A link to the proposal is available here. I did update the blog post and the code accordingly to that comment. Thanks Max! I started a small experiment: writing a very basic kernel in Swift, and running on QEMU.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of QEMU

QEMU

Photo of Swift

Swift

Photo of minimal kernel

minimal kernel

Related news:

News photo

Google hearts Apple's Swift so much it's pumping out server-side support

News photo

Redox OS Adds IO_uring-Like API, NUMA & Gets QEMU Working

News photo

Acer Swift Air 14 review: Wildcat Lake and lots of ports at $699