{"id":51157259,"url":"https://github.com/mohnkhan/myos2026","last_synced_at":"2026-06-26T11:01:50.948Z","repository":{"id":353990212,"uuid":"1221589895","full_name":"mohnkhan/MyOS2026","owner":"mohnkhan","description":"VM First Experimental Operating System written in Rust, A Rust OS operating System","archived":false,"fork":false,"pushed_at":"2026-06-23T14:55:32.000Z","size":171136,"stargazers_count":4,"open_issues_count":92,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-06-23T15:15:13.075Z","etag":null,"topics":["clang","cpp","experimental","kernel","linux-app","linux-compatibility","no-std","operating-system","porting","qemu","rust","rustos","vm","x86-64"],"latest_commit_sha":null,"homepage":"https://www.mohitech.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohnkhan.png","metadata":{"files":{"readme":"README.MD","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.MD","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-26T12:25:41.000Z","updated_at":"2026-06-23T13:20:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mohnkhan/MyOS2026","commit_stats":null,"previous_names":["mohnkhan/myos2026"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mohnkhan/MyOS2026","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnkhan%2FMyOS2026","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnkhan%2FMyOS2026/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnkhan%2FMyOS2026/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnkhan%2FMyOS2026/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohnkhan","download_url":"https://codeload.github.com/mohnkhan/MyOS2026/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnkhan%2FMyOS2026/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34813782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clang","cpp","experimental","kernel","linux-app","linux-compatibility","no-std","operating-system","porting","qemu","rust","rustos","vm","x86-64"],"created_at":"2026-06-26T11:01:50.806Z","updated_at":"2026-06-26T11:01:50.939Z","avatar_url":"https://github.com/mohnkhan.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MyOS2026 — VM-First Operating System in Rust\n\n\u003e A modern, minimal, secure x86_64 operating system written entirely in Rust — designed **specifically for virtual machines**. Fast boot, reproducible images, Linux-compatible syscall ABI, and a full Unix utility layer, all built from scratch with no C in the kernel.\n\n---\n\n## Project Resources\n\n- **Download \u0026 run (testers)**: [`docs/QUICKSTART.md`](docs/QUICKSTART.md) — boot a released image in QEMU or VirtualBox in minutes, no build required\n- **Known issues**: [`KNOWN_ISSUES.md`](KNOWN_ISSUES.md) — current v0.7 limitations; read before filing a bug\n- **Live status \u0026 metrics**: [`docs/STATUS.md`](docs/STATUS.md) — test counts, CI gates, success-criteria dashboard (updated on every feature merge)\n- **Capability inventory**: [`docs/CAPABILITIES.md`](docs/CAPABILITIES.md) — kernel subsystems, syscalls, /proc files, userland binaries\n- **Per-feature history**: [`CHANGELOG.md`](CHANGELOG.md) — what shipped, when, with what trade-offs\n- **Design rationale**: [`Learnings.MD`](Learnings.MD) — what was hard, root causes, non-obvious decisions\n- **Roadmap**: [`ROADMAP.md`](ROADMAP.md) — tiered follow-up work\n- **Validation**: [`VALIDATION.md`](VALIDATION.md) — proof against the 11 success criteria\n- **Wiki**: [github.com/mohnkhan/MyOS2026/wiki](https://github.com/mohnkhan/MyOS2026/wiki) — architecture overviews, getting-started guides, HOWTOs, compatibility matrices\n\n---\n\n## Why MyOS2026\n\n- **Boots in under 2 seconds** to an `nsh$` prompt on BIOS-headless QEMU, with SSH ready in under 5 seconds.\n- **Reproducible images** (identical SHA-256 across runs) and **verified boot** (BLAKE2b → ed25519 attestation chain) by default.\n- **Written entirely in Rust** with ~170 LOC of hand-written assembly. KASAN + FASAN catch memory-safety bugs at the corruption site, not the crash site.\n- **Linux-compatible syscall ABI** on x86_64 — statically-linked musl and glibc ELF binaries run unmodified; 400+ syscalls implemented and differential-tested against Linux.\n\n---\n\n## Use Cases\n\n- **OS learning platform** — every subsystem fits in your head, written in safe Rust with no hidden C glue.\n- **Secure ephemeral VMs** — sandbox + verified boot + fast teardown via snapshot/rollback.\n- **CI/CD throwaway environments** — sub-2-second boot, 18 MB image, SSH ready in under 1 second.\n- **Kernel and systems-programming research** — modify the kernel, rebuild, boot in under 2 minutes. \n\n---\n\n## Quick Start\n\n\u003e **Just want to boot it?** If you only want to run a released image (not build from source), follow the\n\u003e [download-and-run quickstart](docs/QUICKSTART.md) — QEMU/VirtualBox in a few commands, no toolchain needed.\n\n```sh\n# Prerequisites\napt install qemu-system-x86 ovmf sgdisk mtools e2fsprogs qemu-utils nasm python3\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\nrustup toolchain install nightly\nrustup component add rust-src --toolchain nightly\nrustup target add x86_64-unknown-linux-musl\n\n# Build and boot\nRELEASE=1 bash build/scripts/assemble-image.sh myos.qcow2\nmake qemu\n```\n\n\u003e **Save your SSD**: `make tmpfs-setup` redirects `target/` and `dist/` (the only large gitignored output trees) into `/tmp/MyOS/\u003chash\u003e/` so the write-heavy build cycle hits RAM. Reversible, idempotent, opt-in, no-op on CI. See [`docs/dev-tmpfs.md`](docs/dev-tmpfs.md).\n\n### Interactive session\n\nBoot in a graphical window with the kernel framebuffer terminal, and SSH in on port 2222 simultaneously:\n\n```sh\nmake qemu-sdl\nssh -p 2222 -i tests/keys/test_id_ed25519 \\\n  -o StrictHostKeyChecking=no root@127.0.0.1\n```\n\nFor headless and VirtualBox boot recipes, see [`docs/CAPABILITIES.md`](docs/CAPABILITIES.md) and [`specs/001-vm-optimized-os/quickstart.md`](specs/001-vm-optimized-os/quickstart.md).\n\n---\n\n## Demo\n\n![MyOS2026 shell demo](docs/screenshots/demo.png)\n\n*nsh$ prompt with mybox applets, pipe chains, and standard utilities — captured via `make screenshot`.*\n\n![Animated terminal demo](docs/demo.gif)\n\n*Real nsh session over SSH — `uname`, `/proc/meminfo`, `/proc/cpuinfo`, `ps`, a `base64` pipe, and the colored prompt. Generated via `make demo-gif`.*\n\n---\n\n## What's Inside\n\nA complete, self-contained OS stack — kernel, drivers, networking, filesystem, security, and a full Unix userland:\n\n```\n+-------------------------------------------------------+\n|  User Space   init | nsh | mybox (432 applets) | mymc |\n|               cloud-init | dropbear | sandbox         |\n+-------------------------------------------------------+\n|  Security     Per-process syscall allowlist           |\n|               Real UID/GID + supplementary groups     |\n|               Credential audit ring                   |\n|               Verified boot (BLAKE2b → ed25519)       |\n+-------------------------------------------------------+\n|  System       VFS | Syscall dispatch | Pipes | IPC    |\n|               MLFQ scheduler | Linux ELF compat       |\n|               epoll(7) | poll(2) | WaitQueue\u003cN\u003e       |\n+-------------------------------------------------------+\n|  Kernel       MM (demand paging + CoW fork)           |\n|               APIC/HPET | smoltcp | DHCP | ext2       |\n|               procfs (100+ nodes: /net /sys per-PID)  |\n|               KASAN + FASAN + DWARF panic backtraces  |\n+-------------------------------------------------------+\n|  Drivers      virtio-{blk,net,console,rng,scsi}       |\n|               LSI Logic MPT SCSI | Intel E1000        |\n+-------------------------------------------------------+\n|  Hardware     QEMU q35 (primary) | VirtualBox         |\n+-------------------------------------------------------+\n```\n\nFor the full enumeration of subsystems, syscalls, and userland binaries, see [`docs/CAPABILITIES.md`](docs/CAPABILITIES.md).\n\n---\n\n## Highlights\n\n### mybox — Busybox-in-Rust (432 applets)\n\nA multi-call binary providing 432 Unix applets via symlinks in `/bin`. Dispatch is purely by `argv[0]` basename — no runtime overhead per applet. Covers file ops, text processing, filesystem inspection, process control, system info, archives, shell utilities, networking (DNS, HTTP, nc, ping), and `strace`.\n\n```sh\nnsh$ /bin/grep -i root /etc/passwd\nroot:x:0:0:root:/root:/bin/sh\nnsh$ /bin/ls -la /bin/ls\nlrwxrwxrwx        10 ls -\u003e /bin/mybox\nnsh$ mybox --list | wc -l\n432\n```\n\n### Linux ELF binary compatibility\n\nStatically-linked musl ELF binaries compiled on Linux run directly on MyOS2026 without modification:\n\n```sh\n# On a Linux host:\nmusl-gcc -static -o hello hello.c\n\n# Copy to MyOS2026 and run:\nnsh$ /bin/hello\nHello, World!\n```\n\nFull System V AMD64 ABI initial stack with correct `AT_PHDR` (vaddr-not-file-offset) and `AT_SECURE` on suid exec. All musl startup syscalls supported. Invalid accesses deliver `SIGSEGV`; stack overflows are caught at the guard. Dynamically-linked glibc binaries are also supported via the bundled `ld-linux-x86-64.so.2`. See [`docs/CAPABILITIES.md`](docs/CAPABILITIES.md#linux-elf-binary-compatibility).\n\n### Per-process syscall sandbox\n\n```sh\nnsh$ sandbox --allow=read,write,exit /usr/bin/exploit-test\nBLOCKED (errno=1)      ← mount(2) blocked by kernel allowlist\n```\n\nThe kernel enforces a deny-by-default syscall filter per process, installed via `SYS_SANDBOX_ENTER`. Filters survive `execve` and are independent across processes.\n\n### Verified boot\n\nEvery RELEASE build embeds a BLAKE2b hash chain:\n\n```\nUEFI → Limine (config hash enrolled) → kernel.elf (BLAKE2b verified)\n     → kernel_main ([vboot] ACTIVE  pubkey: be5f7844108bcdd1)\n```\n\nAny binary tampering before a single kernel instruction executes causes an immediate boot abort.\n\n### Reproducible builds\n\nTwo independent builds from identical source produce byte-identical QCOW2. Achieved via `SOURCE_DATE_EPOCH`, pinned GPT/FAT UUIDs, and `build/scripts/fix-ext2-timestamps.py`.\n\n---\n\n## Architecture\n\n### Design principles\n\n| Principle | Choice |\n|-----------|--------|\n| Kernel type | Minimal monolithic (Rust, no_std) |\n| Bootloader | Limine v8.x (BIOS + UEFI, single config) |\n| I/O model | virtio-only (blk / net / console / rng / scsi) |\n| Network | smoltcp 0.11 (pure Rust, no_std) |\n| Filesystem | ext2 (custom pure-Rust read/write driver) |\n| SSH | Dropbear (userspace, cross-compiled for musl) |\n| Userland | Rust + statically linked musl |\n| Assembly | ~170 LOC total (entry stub, ISR trampoline, context-switch) |\n\n### Repository layout\n\n```\nkernel/          Rust kernel (no_std)\nuserland/        Userspace crates (musl-static): init, nsh, mybox, mymc, ...\nbootloader/      Limine config + vendored binaries\nbuild/           Makefile, image assembly scripts, CI helpers\ntests/           Boot, SSH, shell, sandbox, syscall, scheduler integration tests\nspecs/           Per-feature specs (NNN-name/{spec,plan,tasks,quickstart}.md)\ndocs/            STATUS.md, CAPABILITIES.md, dev-tmpfs.md, syscall-diff.md\n```\n\nFor the full layout, see [`docs/CAPABILITIES.md`](docs/CAPABILITIES.md#repository-layout).\n\n---\n\n## How It's Built\n\n- **Per-feature spec-kit workflow** — every feature has `specs/NNN-name/{spec,plan,research,tasks}.md` and a quickstart. Implementation follows tests-before-code per the project constitution.\n- **CI gate on every PR** — clippy (`-D warnings`), unit tests in parallel + sequential modes, boot integration under `smp ∈ {1, 2}`, SSH login, sandbox, KASAN, ABI-drift, and docs-gate (per the constituent jobs listed in [`docs/STATUS.md`](docs/STATUS.md#ci-gates)).\n- **Run the pipeline locally before pushing**:\n  ```sh\n  make ci-local       # ~15 min; same step order and timeouts as remote CI\n  ```\n- **In-kernel diagnostics**: dmesg ring (`/proc/dmesg`), per-PID syscall trace (`/proc/\u003cpid\u003e/trace`), symbolized panic backtraces with DWARF line numbers, `kassert!` with PCB context, KASAN + FASAN memory-safety sanitizers.\n\n---\n\n## Contributing\n\nAll changes go through a feature branch and pull request — direct commits to `master` are prohibited.\n\n1. Fork the repository.\n2. Create a feature branch: `git checkout -b NNN-short-description origin/master`.\n3. Read the constitution at `.specify/memory/constitution.md` and the existing specs in `specs/`.\n4. Use the spec-kit workflow: `/speckit-specify`, `/speckit-plan`, `/speckit-tasks`, `/speckit-implement`.\n5. Run `make ci-local` before pushing.\n6. Open a PR targeting `master`. Every feature PR must update [`Learnings.MD`](Learnings.MD), [`CHANGELOG.md`](CHANGELOG.md), and [`docs/STATUS.md`](docs/STATUS.md) (enforced by the `docs-gate` CI step; bypass with `[no-docs]` in any commit message for docs-only or infra-only PRs).\n\nFor project conventions, MANDATORY workflows, and operational guides (in-kernel dmesg + GDB, KASAN, syscall-diff harness, tmpfs build redirection), see [`CLAUDE.md`](CLAUDE.md).\n\n**Good first issues:**\n\n- POSIX `lstat()` that does not follow the final symlink component\n- Dynamic ELF loader (PT_INTERP support) — enables glibc-linked binaries\n- GPG signing pipeline for release artifacts\n\nSee [the issue tracker](https://github.com/mohnkhan/MyOS2026/issues) for follow-up work tagged `good-first-issue` and `follow-up`.\n\n---\n\n## Lineage \u0026 Inspirations\n\nMyOS2026 is the third generation in a personal operating-systems family built by [Mohiuddin Khan Inamdar](https://github.com/mohnkhan), carrying forward lessons learned across two earlier generations:\n\n- **MyRTOS family** — bare-metal real-time operating systems in C; established the interrupt model, timer substrate, scheduling fundamentals, and boot-sequencing patterns that this kernel refines in Rust.\n- **MyOS-Mini family** — minimal x86 OS experiments that validated the VFS layer, process model, and memory-management architecture later rewritten here with Rust's ownership model.\n\n**Inspirations from the broader OS world:**\n\n- **BSD** (FreeBSD, OpenBSD, NetBSD) — process and credential model, VFS layer design, the philosophy of small auditable subsystems with clear contracts, and the importance of a rigorous manual-page ABI.\n- **Linux** — the x86_64 syscall ABI that MyOS2026 targets for compatibility, ELF loading conventions, `/proc` filesystem layout, virtio device model, and the `no_std` discipline shown by the kernel's C99 environment.\n- **Academic kernels** (xv6, Minix, L4) — clarity-over-features design discipline; every subsystem in MyOS2026 should be explainable from first principles in a single sitting.\n- **Rust OS community** (Redox, blog_os, Tock) — prior art on applying Rust's ownership model to kernel concurrency, `no_std` ecosystem crate choices, and inline-assembly idioms.\n\n---\n\n## License\n\nMozilla Public License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohnkhan%2Fmyos2026","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohnkhan%2Fmyos2026","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohnkhan%2Fmyos2026/lists"}