Welcome to the Cosmos gen3 wiki!
Check out the Roadmap to see our progress toward the first release 🚀.
The documentation is split in two parts, depending on what you want to do with gen3:
- User Guide: you want to build your own OS with Cosmos: installing the toolchain, using the filesystem, debugging your kernel.
- Contributor Docs: you want to contribute to Cosmos itself or understand its internals: architecture, build pipeline, runtime subsystems.
User Guide
Everything you need to create, build and run your own Cosmos kernel:
- Installation Guide: set up the toolchain and create your first kernel from VS Code.
- Kernel Startup: the boot chain and the
BeforeRun/Run/AfterRunlifecycle. - File System: mount a disk and use the standard .NET
System.IOAPI (File,Directory, streams). - Network: DHCP, UDP and TCP through the standard .NET
System.Net.SocketsAPI, plus DNS. - Graphics: draw shapes, text and images on the screen with the Canvas API.
- Keyboard: read lines, key events and layouts through
ConsoleandKeyboardManager. - Mouse: pointer position, buttons and scroll wheel through
MouseManager. - Debugging with VSCode and QEMU: set breakpoints in your kernel with remote GDB.
Contributor Docs
Architecture and internals, for contributors and the curious:
- Dev Container Setup: build the framework from source.
- Kernel Project Layout: the layered project graph.
- Coding Guidelines: style and architecture patterns.
- Plugs: the IL-level method replacement system.
- Testing: unit tests and QEMU kernel test suites.
- Public API Tracking: declared surface files, package validation, versioned docs.
- Garbage Collector: the mark-and-sweep GC.
- Garbage Collector - Precise Stack Scan: how GCInfo makes the triggering thread's stack scan exact.
- Garbage Collector - Glossary: background notes on the GC concepts the articles build on.
- Scheduler: the preemptive, pluggable scheduler.
- Scheduler - Writing a Scheduler: how to implement and install a scheduling policy.
- Scheduler - Glossary: background notes on the scheduling concepts the article builds on.
- Kernel Compilation Steps: C# to bootable ISO, end to end.
- Cosmos.Build.Asm, Cosmos.Build.GCC, Cosmos.Build.Patcher, Cosmos.Build.Ilc: the build pipeline components.