A minimal kernel in Swift, running in QEMU 0 ▲ A journey into a wild pointer 1 hour ago · 9 min read1880 words · Tech · hide · 0 comments I started a small experiment: writing a very basic kernel in Swift, and running on QEMU. 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. Actually I made a similar experiment years before with arOS 10 years ago. For the moment, the kernel does only one thing: it prints a message through QEMU and then waits forever, which is enough for a first deep dive. Swift Embedded # The project uses Embedded Swift, which is a subset of Swift designed for environments where there is no operating system and no standard library available (in the usual sense). My first Package.swift was very small: // swift-tools-version: 6.4 import PackageDescription let package = Package( name: "swift-kernel", platforms: [.macOS(.v14)], targets: [ .executableTarget( name: "swift_kernel", swiftSettings: [ .enableExperimentalFeature("Embedded"), .strictMemorySafety(),… No comments yet. Log in to reply on the Fediverse. Comments will appear here.