{"id":31579114,"url":"https://github.com/bac0nb0yy/kfs","last_synced_at":"2026-04-17T13:32:49.867Z","repository":{"id":310840560,"uuid":"1038051948","full_name":"bac0nb0yy/kfs","owner":"bac0nb0yy","description":"Designing our own kernel in Rust + ASM","archived":false,"fork":false,"pushed_at":"2025-09-17T05:40:03.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-26T13:28:23.372Z","etag":null,"topics":["assembly","bootloader","i386","kernel","multiboot","operating-system","rust","school42"],"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/bac0nb0yy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-14T14:40:33.000Z","updated_at":"2025-09-17T05:40:06.000Z","dependencies_parsed_at":"2025-08-20T15:39:23.951Z","dependency_job_id":"c22d7e7a-cd5b-4e1f-8960-6f5b12568641","html_url":"https://github.com/bac0nb0yy/kfs","commit_stats":null,"previous_names":["bac0nb0yy/kfs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bac0nb0yy/kfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bac0nb0yy%2Fkfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bac0nb0yy%2Fkfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bac0nb0yy%2Fkfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bac0nb0yy%2Fkfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bac0nb0yy","download_url":"https://codeload.github.com/bac0nb0yy/kfs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bac0nb0yy%2Fkfs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31931423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T12:37:54.787Z","status":"ssl_error","status_checked_at":"2026-04-17T12:37:25.095Z","response_time":62,"last_error":"SSL_read: 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":["assembly","bootloader","i386","kernel","multiboot","operating-system","rust","school42"],"created_at":"2025-10-05T20:47:03.711Z","updated_at":"2026-04-17T13:32:49.862Z","avatar_url":"https://github.com/bac0nb0yy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kfs: A Minimal Rust Kernel for i386\n\nThis project is a minimal operating system kernel written in Rust and assembly for the i386 architecture. It demonstrates how to build a simple kernel that boots using the Multiboot2 specification and displays a message on the VGA text buffer.\n\n## Features\n\n- **Rust-based kernel**: The kernel is written in Rust with `#![no_std]` and `#![no_main]` attributes.\n- **Assembly bootloader**: The bootloader is implemented in NASM assembly and adheres to the Multiboot2 specification.\n- **Custom linker script**: A custom `linker.ld` script is used to define memory layout and entry points.\n- **VGA text output**: The kernel writes directly to the VGA text buffer to display output.\n- **ISO generation**: The kernel is packaged into a bootable ISO using GRUB.\n\n## Project Structure\n\n```\nkfs/\n├── .gitignore\n├── Cargo.lock\n├── Cargo.toml\n├── i386-unknown-none.json\n├── linker.ld\n├── Makefile\n├── README.MD\n├── rust-toolchain.toml\n├── .cargo/\n│   └── config.toml\n├── iso/\n│   └── boot/\n│       └── grub/\n│           └── grub.cfg\n└── src/\n    ├── asm/\n    │   ├── boot.asm\n    │   └── multiboot.asm\n    └── rust/\n        └── lib.rs\n```\n\n- **`src/rust/lib.rs`**: The Rust kernel entry point.\n- **`src/asm/boot.asm`**: The assembly bootloader that calls the kernel.\n- **`src/asm/multiboot.asm`**: Multiboot2 header for GRUB compatibility.\n- **`linker.ld`**: Defines the memory layout and entry point.\n- **`Makefile`**: Automates the build, clean, and run processes.\n- **`iso/boot/grub/grub.cfg`**: GRUB configuration for booting the kernel.\n\n## Prerequisites\n\n- **Rust nightly toolchain**: Install using `rustup` and ensure the `rust-toolchain.toml` is respected.\n- **NASM**: For assembling the bootloader.\n- **QEMU**: For running the kernel in a virtualized environment.\n\n## Building and Running\n\n1. **Build the kernel**:\n\n   ```sh\n   make all\n   ```\n\n2. **Create a bootable ISO**:\n\n   ```sh\n   make iso\n   ```\n\n3. **Run the kernel**:\n\n   ```sh\n   make run\n   ```\n\n4. **Clean the build artifacts**:\n\n   ```sh\n   make clean\n   ```\n\n5. **Fully clean the project**:\n   ```sh\n   make fclean\n   ```\n\n## Debug vs Release builds\n\nThe `Makefile` supports toggling between release and debug profiles using the `DEBUG` variable.\n\n- Default (release): optimized build\n   ```sh\n   make                 # builds with `cargo build --release`\n   make iso             # packages current build into an ISO\n   ```\n- Debug: unoptimized with debuginfo\n   ```sh\n   make DEBUG=1         # builds with `cargo build`\n   make DEBUG=1 iso     # ensures the kernel is rebuilt in debug before creating the ISO\n   ```\n\nUnder the hood, this switches the Rust build profile and links the appropriate\n`target/i386-unknown-none/\u003cprofile\u003e/libkfs.a` into `kernel.bin`.\n\n## How It Works\n\n1. **Bootloader**: The `boot.asm` file initializes the system and calls the `kernel_main` function in Rust.\n2. **Kernel**: The `kernel_main` function clears the VGA buffer and writes \"42\" in the center of the screen.\n3. **GRUB**: The Multiboot2 header in `multiboot.asm` ensures compatibility with GRUB, which loads the kernel.\n\n## Acknowledgments\n\n- Inspired by the [Writing an OS in Rust](https://os.phil-opp.com/) series.\n- Uses GRUB for bootloading and QEMU for virtualization.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbac0nb0yy%2Fkfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbac0nb0yy%2Fkfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbac0nb0yy%2Fkfs/lists"}