A bare-metal x86 operating system and a high-fidelity web-based simulator, featuring a custom Rust kernel and a #![no_std] 3D raycaster game inspired by DOOM.
- Language: Rust (
#![no_std], bare-metal). - Architecture: x86_64.
- Memory Management: Physical and virtual memory management.
- Privilege Levels: Ring 3 transitions.
- Interrupts & System Calls: GDT/IDT management and an MSR-based Syscall interface.
- Drivers: Custom VGA display driver and PS/2 keyboard driver.
- File System: Basic FAT12 file system reader to load executables from disk.
- A standalone 3D raycaster game running entirely in user-space (Ring 3).
- Communicates with the kernel via custom syscalls for display output and keyboard input.
- Written in
#![no_std]Rust.
- An interactive, browser-based simulator built with HTML, CSS (Vanilla), and JavaScript.
- Desktop UI: A dynamic and responsive visual interface mimicking a retro-futuristic desktop environment.
- Virtual CPU & FAT12 Inspector: Live views of CPU registers and disk contents.
- Web Raycaster: A JavaScript implementation of the 3D raycaster game, playable directly in the browser.
- Automated build process driven by Cargo (
build.rs) and Python (build_disk.py). - Compiles the kernel and user-space binaries.
- Packages them into a bootable 1.44MB FAT12 disk image (
fat_disk.img).
- Rust Toolchain: Nightly Rust with
x86_64-unknown-nonetarget. - Python 3: For running the disk image build script.
- QEMU: To boot and test the generated disk image locally.
- Node.js: (Optional) For running the local web server to host the simulator.
- Ensure your Rust environment is set up for cross-compiling. The project uses a custom target
x86_64-antigravity_os.json. - Run the build script to compile the kernel and the doom game, and generate the disk image:
python build_disk.py
- The script will generate
fat_disk.img.
You can run the OS using cargo run, which is configured (via .cargo/config.toml and .cargo/runner.ps1) to launch QEMU:
cargo runOr you can manually start QEMU with the generated disk image:
qemu-system-x86_64 -drive format=raw,file=fat_disk.imgTo experience the web-based simulator:
- Start a local development server in the root directory:
npm run dev # or simply npx serve .
- Open your browser and navigate to the provided localhost URL (e.g.,
http://localhost:3000).
src/: Kernel source code, including memory management, VGA driver, and syscall interface.doom_game/: User-space 3D raycaster implementation.build_disk.py: Script to generate the FAT12 disk image.index.html,style.css,app.js: The web simulator frontend..cargo/: Configuration for building and running the OS via QEMU.x86_64-antigravity_os.json: Custom target specification for the kernel.
MIT License