Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NyxOS, rebuilt from scratch in C# — a freestanding 64-bit kernel that boots on bare metal

     


About

Part of the NyxOS family — the same OS, rebuilt from zero in a different language each time. This is the C# cut, compiled ahead-of-time by bflat with the Zero stdlib — no BCL, no GC in use. A [UnmanagedCallersOnly(EntryPoint = "kmain")] method becomes the kernel entry; a Multiboot stub enters long mode and calls it. The banner comes from a u8 string literal (static data — no allocation).

NyxOS-CSharp booting in QEMU

NyxOS-CSharp booting in QEMU — AOT-compiled C# writing to the VGA text buffer

Why C#: ahead-of-time native compilation (bflat / NativeAOT) makes a managed language run with no runtime under it. Proven in the wild by Cosmos.

Build & run

Needs bflat (+ libc++1), nasm, gcc, ld, grub-mkrescue, and qemu.

make        # -> nyxos-csharp.iso  (64-bit ELF booted via GRUB)
make run    # boot the ISO in QEMU

Layout

  • boot64.asm — Multiboot header + the 32-bit → long-mode trampoline that calls kmain
  • kernel.cs — the freestanding C# kernel (VGA console)
  • stubs.c — the two Zero-runtime platform hooks (SystemNative_Malloc/Abort)
  • linker64.ld / grub.cfg / Makefile — link, package, boot

Status

Early — it boots and paints the screen. Next up: a GDT/IDT, interrupts, and a VGA Console type.

About

NyxOS, rebuilt from scratch in C# — a freestanding x86_64 OS. Part of the NyxOS family.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages