marcel_os is an operating system project developed in Rust. This repository contains the source code and resources necessary to build and run.
- Bootable Kernel: A fully functional kernel capable of booting on x86_64 hardware.
- VGA Buffer Driver: Direct manipulation of the screen using VGA text mode.
- Unit and Integration Test Suite: Comprehensive tests to ensure code reliability and stability.
- CPU Exception Handling: Mechanisms to handle CPU exceptions and faults gracefully.
- Interrupt Handling: Efficient management of hardware and software interrupts.
- Four-Level Paging: Advanced memory management using four-level paging.
- Dynamic Memory Management: Allocation and deallocation of memory at runtime.
- Single-Core Preemptive Executor: A scheduler that allows preemptive multitasking on a single core.
- Keyboard Support: Basic input handling for keyboard devices.
- Simple CLI: A command-line interface for user interaction.
- Rust Compiler: Ensure you have the latest stable version of Rust installed. You can download it from rust-lang.org.
- Cargo: Rust's package manager, included with the Rust installation.
- QEMU: An emulator to run marcel_os without physical hardware. Download it from qemu.org.
To build and run marcel_os, it's recommended to use the 2024-12-31 nightly version of Rust. Follow these steps:
-
Install the Latest Nightly Toolchain:
Use
rustup
to install a valid nightly version:rustup toolchain install nightly-2024-12-31
-
Set the Toolchain for the Current Directory: To use this specific nightly version in your current project directory, set an override:
rustup override set nightly-2024-12-31
This ensures that any
cargo
orrustc
commands run within this directory use the specified nigthly version. -
Verify the Active Toolchain: Confirm that the override is set correctly:
rustup show
Look for the "overrides" section to ensure the correct toolchain is active in your directory.
marcel_os requires additional Rust components for building:
-
Add the Rust Standard Library Source: This component provides the source code of the Rust standard library, which is necessary for building the kernel:
rustup component add rust-src
-
Add LLVM Tools: The LLVM tools are required for certain build processes:
rustup component add llvm-tools-preview
These components are installed per toolchain, so ensure you're using the correct toolchain when adding them.
-
Clone the Repository:
git clone https://github.com/sa4dus/marcel_os.git cd marcel_os
-
Build the Kernel:
cargo build --release
This command compiles the kernel and outputs the binary in the
target/release
directory -
Running marcel_os: After building, you can run marcel_os locally in your machine using QEMU:
cargo run
Contributions are welcome! Please follow these steps:
-
Fork the Repository: Click on the "Fork" button at the top right of this page.
-
Create a New branch: Use a descriptive name for your branch.
-
Make Changes: Implement your feature or fix
-
Commit Changes: Write clear and concise commit messages.
git commit -m "[prefix]: [description of the changes]
-
Push to Your Fork:
git push origin feature-name
-
Submit a Pull Request: Navigate to the original repository and click on "New Pull Request".
This project is licensed under the MIT License. See the LICENSE file for details.
- Writing an OS in Rust: A comprehensive tutorial on building an operating system in Rust. https://os.phil-opp.com/
- Rust OS Comparison: A comparison of various Rust-based operating systems. https://github.com/flosse/rust-os-comparison
- Operating Systems from 0 to 1: A book that guides readers through building an operating system from scratch.
- Systems Programming: A Programmer's Perspective: A book that provides insights into systems programming concepts.
- Redox OS: An operating system written in Rust. https://github.com/redox-os/redox
- Rust OSDev: A community focused on Rust-based operating system development. https://github.com/rust-osdev
- OSDev Wiki - Expanded Main Page: A comprehensive resource for operating system development. https://wiki.osdev.org/Expanded_Main_Page