{"id":20596833,"url":"https://github.com/alexander-akhmetov/mos","last_synced_at":"2025-04-14T23:51:37.089Z","repository":{"id":52372484,"uuid":"167813936","full_name":"alexander-akhmetov/mos","owner":"alexander-akhmetov","description":"small operating system","archived":false,"fork":false,"pushed_at":"2021-04-30T10:03:51.000Z","size":2025,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T11:51:08.713Z","etag":null,"topics":["kernel","os","osdev","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexander-akhmetov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-27T13:48:22.000Z","updated_at":"2024-10-06T07:26:31.000Z","dependencies_parsed_at":"2022-09-07T17:10:25.717Z","dependency_job_id":null,"html_url":"https://github.com/alexander-akhmetov/mos","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-akhmetov%2Fmos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-akhmetov%2Fmos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-akhmetov%2Fmos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-akhmetov%2Fmos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexander-akhmetov","download_url":"https://codeload.github.com/alexander-akhmetov/mos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248981259,"owners_count":21193144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["kernel","os","osdev","rust"],"created_at":"2024-11-16T08:18:57.881Z","updated_at":"2025-04-14T23:51:37.071Z","avatar_url":"https://github.com/alexander-akhmetov.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mos\n\nMy attempt to write a small operating system (and to try Rust :) ).\n\n**mos**\n\n![mos: msh](https://github.com/alexander-akhmetov/mos/blob/readme-pics/screenshots/msh.png?raw=true)\n\n**mOS boot log**\n\n![mos: start-up logs](https://github.com/alexander-akhmetov/mos/blob/readme-pics/screenshots/start.png?raw=true)\n\n\n\n## Development\n\nStart QEMU with mOS inside:\n\n```shell\nmake run\n```\n\nRun tests:\n\n```shell\nmake tests\n```\n\n### Folders structure\n\n* `./initrd`: all files in this directory will be placed into a single archive and mounted as a TarFS to `/initrd`\n* `./src`: kernel source code\n* `./lib`: Contains userspace programs and `librust`: Rust library to write programs for mOS.\n\n**OS Entrypoint**: `/src/lib.rs`.\n\n## Requirements\n\n* Cross compiled binutils (actually only `ld`): `docs/binutils.md`\n* NASM\n* Rust nightly (I use `nightly-2019-11-04`)\n* Docker to build iso with GRUB bootloader\n* QEMU\n* gnu-tar on MacOS (`brew install gnu-tar`)\n\n## librust\n\nYou can build userspace programs for mOS. To communicate with OS from Rust code you need to use `librust`.\nIt is a library which provides interface to use all implemented system calls.\n\n# What can it do?\n\n* [x] Load! :-)\n* [x] Print to VGA buffer\n* [x] Mount ramdisk\n* [x] Built-in support for TarFS\n* [x] Interrupts\n* [x] System clock\n* [x] Syscalls ABI\n* [x] Processes support, context switching\n* [x] Start init process\n* [x] Shell for user's commands: `msh`\n\n\n## ToDo\n\n* Fix paging. It does not work properly, and because of that it's not possible to start separate processes. Now programs are being running as threads inside the OS.\n* After paging mmap call in the `librust` must be completed, so it will be possible to request memory from userspace.\n* Higher Half Kernel\n* `fork` syscall\n...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexander-akhmetov%2Fmos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexander-akhmetov%2Fmos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexander-akhmetov%2Fmos/lists"}