{"id":49185880,"url":"https://github.com/floffah/lazers","last_synced_at":"2026-04-23T04:02:33.417Z","repository":{"id":343119162,"uuid":"1176033516","full_name":"Floffah/lazers","owner":"Floffah","description":"my attempt at operating system","archived":false,"fork":false,"pushed_at":"2026-03-15T01:20:47.000Z","size":373,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-18T13:35:11.496Z","etag":null,"topics":["operating-system","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Floffah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-08T14:26:29.000Z","updated_at":"2026-03-15T01:20:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Floffah/lazers","commit_stats":null,"previous_names":["floffah/lazers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Floffah/lazers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Floffah%2Flazers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Floffah%2Flazers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Floffah%2Flazers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Floffah%2Flazers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Floffah","download_url":"https://codeload.github.com/Floffah/lazers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Floffah%2Flazers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32165201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T02:19:40.750Z","status":"ssl_error","status_checked_at":"2026-04-23T02:17:55.737Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["operating-system","rust"],"created_at":"2026-04-23T04:02:31.629Z","updated_at":"2026-04-23T04:02:33.402Z","avatar_url":"https://github.com/Floffah.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lazers\n\nLazers is a from-scratch operating system project so I can learn about OS design and implementation by building one myself. This is a learning \u0026 portfolio project.\nIf this were ever to be finished it would stand as a practical, modular, modern OS that can run on real hardware, and is specifically for lazy developers (laz-ers) who want to write code not configure their environment.\n\nThought I'd make it public in case anyone else finds it interesting or useful, but it's really just a personal learning project and not intended for anyone else's use. The code is MIT licensed, so if you want to copy anything, go for it.\n\n## Principles\n\n- Lazers is primarily written in Rust with a small amount of assembly harnesses.\n- Structured as a monorepo, but boot, kernel, and userspace code are separate, but may share libraries when it makes sense.\n  - The kernel specifically is a modular monolith (or aims to be), but userspace is on its own and can evolve separately.\n  - Structure is self-explanatory\n- Avoiding UNIX/DOS heritage where possible, but not dogmatically. If a convention serves the system well, it can be adopted; if it doesn't, it can be reinvented.\n- Low coupling where possible and minimal shortcuts\n\n## Checkpoints\n\nThis is the high-level roadmap for Lazers as it exists now. It tracks major capability checkpoints rather than every version bump.\n\n### Complete\n\n- [x] Monorepo workspace with separate boot, kernel, shared library, userland, tooling, and architecture areas\n- [x] Real `UEFI -\u003e loader -\u003e kernel` boot path on `x86_64`\n- [x] Shared `BootInfo` handoff from loader to kernel\n- [x] Kernel-owned framebuffer text output\n- [x] Keyboard input reaching the running system\n- [x] Terminal-style text runtime with process `stdin`, `stdout`, and `stderr`\n- [x] Cooperative kernel scheduler with explicit `Process` and `Thread` models\n- [x] First real user-mode boundary with syscall handling\n- [x] Kernel-owned paging and per-process address spaces\n- [x] Shared `ELF` parsing/loading path for boot and runtime executable loading\n- [x] Raw GPT disk image with separate `LAZERS-ESP` and `LAZERS-SYSTEM` partitions\n- [x] AHCI/SATA disk access in the kernel\n- [x] Runtime root filesystem mounted from the system partition\n- [x] Disk-backed user executable loading from `/system/bin/...`\n- [x] `liblazer` bootstrap runtime for early userland programs\n- [x] User-initiated child process spawn and synchronous wait\n- [x] First shell as a normal userland program: `lash`\n- [x] First external user commands: `echo`, `ls`, and `pwd`\n- [x] Process-owned current working directory with inherited cwd on spawn\n- [x] First shell built-ins that must affect the shell process itself: `cd` and `exit`\n- [x] Userland `argv` exposed through `liblazer::args()`\n- [x] Read-only file access from userland beyond directory listing and first file-content command: `cat`\n- [ ] Better shell command parsing beyond split-on-space tokenization\n- [x] First in-OS status-based userland self-test command: `selftest`\n- [x] Host-visible serial logging for kernel and primary terminal output\n- [x] Host-captured selftest workflow through `just selftest`\n- [ ] Richer command argument support across userland programs\n- [ ] More core commands beyond the bootstrap set\n- [x] Top-level process exit policy that shuts the system down when `lash` or `selftest` exits\n- [ ] Filesystem write support\n- [ ] VFAT long-name support or a deliberate replacement strategy\n- [ ] A fuller userland process model beyond synchronous spawn-and-wait\n- [ ] Timer-driven preemption\n- [ ] SMP / multicore support\n- [ ] A more complete userland runtime beyond early `liblazer`\n- [ ] A real package of day-to-day user programs beyond the current bootstrap set\n- [ ] A real installer/update path for writing Lazers onto target hardware\n- [ ] Broader boot/runtime support outside the current `UEFI x86_64` path\n- [ ] Long-term filesystem direction beyond the current FAT32-first runtime setup\n- [ ] Far future higher-level graphics and windowing stack beyond the text terminal\n\n## Build entry point\n\nUse `just` as the primary task runner for repository workflows.\n\nImportant tasks include:\n- `just setup-toolchain` - install Rust toolchain components and target specifications\n- `just run` - Builds everything, assembles the disk image, and runs it in QEMU with GUI\n- `just run-headless` - Same as `just run` but runs QEMU in headless mode and saves a screenshot of the framebuffer output to `build/qemu-headless.png` hopefully after boot (for debugging kernel really)\n- `just run-selftest` - Boots the kernel into self-test mode, via the selftest binary.\n- `just run-selftest-headless` - Same as `just run-selftest` but captures a headless screenshot\n- `just selftest` - Boots the selftest image headlessly, mirrors in-OS serial output to the host console, saves it to `build/selftest-serial.log`, and fails if the final selftest summary reports any failures or is missing\n- `just check` - runs a monorepo wide `cargo check` \n- `just test` - runs all rust tests and selftest\n- `just clean` - cleans build artifacts across the monorepo\n\nOther tasks for debugging and development include:\n- `just build-loader` - builds the UEFI loader only\n- `just build-kernel` - builds the kernel only\n- `just build-user` - builds the user binaries only\n- `just image` - assembles the disk image from the boot, kernel, and user artifacts\n- `just image-selftest` - assembles a separate image that launches `/system/bin/selftest` as the first user program\n\n## Running\n\nIf running on macOS or Linux, make sure you have Rust installed with the correct toolchain (`just setup-toolchain`) plus the host-side packages needed for QEMU, OVMF firmware, and disk image creation.\nThen all you need to do is run `just run` and everything will be built and you'll see the QEMU window pop up running lazers. Exiting the top-level `lash` shell powers the system off.\n\nFor actual hardware, I've not tested this, but it's probably possible.\nLikely all it involves is building it on a supported host, running `just image`, and then flashing the resulting `build/lazers.img` to a disk drive or USB and booting from that on UEFI (x86) hardware.\n\n## Development\n\nTooling now supports macOS and Linux hosts. Generic entrypoints live under `tools/scripts/`, while host-specific implementations live under `tools/scripts/macos/` and `tools/scripts/linux/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloffah%2Flazers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloffah%2Flazers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloffah%2Flazers/lists"}