SwiftOS
In support of an open source, opinionated, entirely Swift based OS
The community should build an open source SwiftOS inspired by the XNU kernel and Darwin OS open source Apple projects GitHub - apple-oss-distributions/xnu
The Problem
Independent device makers trying to do something novel generally use Android for ease of use and its open nature, however Android has a number of disadvantages in performance and memory management compared to Apple technologies present in Darwin and Swift, such as ARC, among others. The world should benefit from the efficiencies of Apple’s OS and Swift related technologies.
A company like Daylight should build their innovations on SwiftOS, not Android Daylight DC1: a new tablet with a better screen and no blue backlight - The Verge
The Solution
SwiftOS would have the following main goal and differentiated from other open source OS attempts in both the FreeBSD (PureDarwin, DarwinBSD, etc.) and Linux community (elementaryOS etc.) which are not XNU based, and other attempts try to have AppKit compatibility or reproduce macOS from 20 years ago (helloSystem, ravynOS https://ravynos.com). Instead, the goal is to go where the hockey puck is going, not where it has been.
As such, we should embrace SwiftUI and have a new target, SwiftOS, alongside Apple commercial platforms. SwiftOS should be a common standard layer that can run on small microcontrollers or large multi-core ARM servers. It should support ARM and RISC-V, but not bother with x86/amd64. It should run on Apple Silicon and Snapdragon X SoCs. It should embrace the modern, decentralized web and webAssembly. Of course it should be designed with local LLM / AI processing in its bones as is appropriate.
The Dream
The idea would be someone can build an app for Apple devices in SwiftUI, and have it also run on SwiftOS on an ARM device seamlessly. These non-Apple SwiftOS devices could be smartphones, tablets, computers, micro controllers, XR headsets, cars, robots, whatever. It should focus on a compelling OS alternative for the future, not try to replicate past desktop experiences.
This should be the next generation NEXTstep OS, and if done right, Apple should incorporate it into their own commercial products. (e.g. the community is helping them port Darwin to Swift) Of course they can have proprietary code and services embedded on their devices, so a Mac is still a Mac and different from someone’s SwiftOS pc, but the SwiftOS PC could still run all SwiftUI built software.
It should enforce the latest Swift 6 concurrency requirements. Things like Swift Charts and Swift Data should work as well (mapped to a different db and ORM than CoreData as necessary). The community would have to build the UI layer in lieu of UIKit / AppKit that SwiftUI hooks into. Of course, SwiftUI should also be open sourced. All of this should emphasize the SwiftUI maxim, learn once, apply anywhere.
Conclusion
I am not an OS engineer, I’m sure there’s a million technical problems with this idea, not to mention business problems. However, I still want this to exist, I think it would be better for the world. The world should not run on Linux, Dart and Flutter, JavaScript and React, it should run on Darwin, Swift and SwiftUI.
Tell me why it won’t work, why I don’t know what I’m talking about, I want to understand this problem better.