GEN3NativeAOT release · v3.0.79

Write an OS in modern C#.
Compiled ahead-of-time.
Runs on every hardware.

Cosmos is an open-source C# operating system framework. Author your kernel in C# 14, compile it with NativeAOT, and boot it on x64 or ARM64, no JIT, no managed runtime.

// what's inside

Everything you need to boot C# on bare metal.

Gen3 replaces IL2CPU with the official .NET toolchain. Everything above it: GC, scheduler, drivers, network, filesystem is C# you can read, plug or replace.

C# 14.NET 10NativeAOTLimine
  • The Cosmos build pipeline runs NativeAOT codegen, assemble, link and pack a bootable ISO for the Limine bootloader.

  • Cosmos.Patcher replaces runtime methods at the IL level before NativeAOT compiles them.

  • Target selected by RuntimeIdentifier: APIC interrupts on x64, GIC on ARM64, GAS assembly on both, MMIO where there is no port I/O.

  • Strings, collections, generics, threading, Console — compiled by NativeAOT, no JIT, no managed runtime.

  • Mark-and-sweep GC with precise stack scanning, a preemptive priority-based stride scheduler with lock support, exception handling with unwinding.

  • TCP and UDP sockets over Cosmos’ own network stack: ARP, IPv4, DHCP and DNS. HTTPS/TLS is on the roadmap.

  • AHCI/SATA and NVMe drivers, MBR/GPT/EBR partitioning, FAT12/16/32 on a Unix-style VFS.

  • Double-buffered Canvas API on the UEFI GOP framebuffer (via Limine), keyboard and mouse input.

  • ACPI support through the LAI library, plus UART serial for logging and debugging the kernel.

// built with cosmos

Featured projects

Don’t know where to start? See these projects to learn Cosmos by example and for inspiration!

  1. aura-systems/Aura-Operating-System290 starsAuraOS, the Franco-English Operating System developed in C# using Cosmos! #aura #aura-kernel #aura-operating
  2. Project-Prism/Prism-OS90 starsAn operating system written in C#, Made possible by the cosmos community! #csharp #operating-system #os
  3. LumaTechnologies/SphereOS74 starsSphereOS - An operating system written in C#, powered by Cosmos. #operating-system
  4. Ncleardev/NclearOS-242 starsCosmos based Operating System with GUI. #operating-system #os
  5. Adisol07/SaphireOS24 starsNew operating system #csharp #csharp-code #csharp-library
  6. ascpixi/cosmos-coroutines22 stars⏱ A simple, non-preemptive coroutine scheduler that allows for cooperative multitasking within Cosmos kernels #cooperative-multitasking #coroutines #csharp
  7. AAM1075/XenOS15 starsXenOS is an operating system written in .NET C# and is made possible by the Cosmos OS project. #c-sharp #dotnet #operating-system
  8. mirage-desktop/Mirage-classic12 starsMirage Desktop Environment (Classic) #csharp
  9. DogOSdev/DogOS9 starsA Operating System made with Cosmos and in C#. 🐕 #csharp #dotnet #dotnet-core
  10. xccoreco/DuskOS8 starsDusk Operating System Made In Comsos
  11. DuskOS-Group/DuskOS6 starsA C#/COSMSOS-based operating system, designed to be used on any system. #csharp #desktop #mit-license
  12. GeorgeFence/PatchOSProject5 starsPatchOS is operating system made in C# with Cosmos #csharp #kernel #opensource
12 repos · updated 2026-10-29 · tag yours cosmos-os to appear here
// three generations

Eighteen years of C# on the metal.

Cosmos has had three lives. Gen3 is the largest re-foundation since the project began.

  1. (tag: gen1)
    Date: 2007

    The proof.

    Original Cosmos. Proof that you could compile C# down to something that boots on bare metal. A small project with a big idea.

  2. (tag: gen2)
    Date: 2010s — 2024

    IL2CPU era.

    A custom IL-to-x86 compiler, built and maintained by the community for over a decade. IL2CPU translated .NET bytecode straight to assembly, and powered hobby OSes for years.

  3. (HEAD -> gen3)
    Date: Today

    NativeAOT.

    We retired 15 years of custom compiler work and stood on the shoulders of NativeAOT. Cosmos now patches .NET's official AOT pipeline at the IL level, modern language features, faster builds, less code to maintain.

// the people

Built by the community.

Every author in the Cosmos history — 190 people across both generations, from the 2007 proof of concept to Gen3.