Skip to content
NightFox-YTPublic

About

Light hybrid OS (NASM x86 & Rust) with Russian codebase

Topics

Resources

Contributing

Stars

56 stars

Watchers

7 watching

Forks

Latest commit

 

History

121 Commits

Folders and files

Repository files navigation

ℹ️ Realix v0.12

Status License Architecture

✅ This version is officially supported and frequently updated by the author.

📌 About

Realix is a hybrid OS for the x86 architecture. The bootloader and 16-bit kernel are written in x86 assembly (NASM), the 32-bit kernel is written in Rust (no_std). It supports a built-in boot switcher that lets you choose between a 16-bit Real Mode kernel for legacy compatibility and a 32-bit Protected Mode kernel for high performance.

  • OS size: ≈40.2 KB
  • Initial release: September 14, 2026

✨ Key Features

  • BIOS-based bootloader: Bootix (stage 1, 512 bytes) + Initrix (stage 2) with Auto-boot into the 32-bit kernel after a timeout
  • BIOS-API (for kernel16):
    • VGA text mode (80×25) and video mode (320×200, 256 colors)
    • Reads raw sectors from disk (INT 13h) with retries and controller reset
    • Read-only FAT12 filesystem support:
      • Loads second-stage bootloader
      • Loads files by filename
      • Protected memory regions: a file can never overwrite the IVT, bootloader or running kernel
    • Detects available system memory (int 12h, int 15h E820)
  • Interactive CPU mode selector (switcher.asm)
  • Kernel16:
    • Command-line interface with history (Up and down arrows)
    • 16-bit syscall interface (int 0x80) with an RLX executable loader — user-mode 16-bit apps live under apps/ and run via exec
    • Commands (grouped by category):
      • base: help, clear/cls, echo [t], about, beep, meminfo, uptime, sysinfo
      • numbers: calc (positive integers only), hex, fib
      • text: len, upper, lower, reverse, repeat, ascii
      • system: regs, time, date, vga, panic
      • power: reboot, shutdown
      • fat12: ls, load, type (Print a file as text), hexdump, exec (Run a 16-bit rlx app)
    • Panic and exception handlers with a diagnostic screen
    • Network interface card (NIC) driver
  • Kernel32:
    • VGA text mode (80×25)
    • Command-line interface
      • help, echo [t], clear/cls
      • uptime - Show uptime in seconds
      • meminfo - Show memory information
      • 🆕 calc - Calculator
      • 🆕 stopwatch - Stopwatch
      • matrix - Fun animation
      • reboot, shutdown
    • Advanced GDT with TSS
    • Advanced IDT with ISR (Exceptions, IRQ0 - PIT, IRQ1 - Keyboard)
    • PIC remap, spurious interrupt (IRQ7/IRQ15) detection
    • Frame allocator built from the E820 memory map passed by the bootloader
    • NovaAI experiment: run a local Qwen 2.5 0.5B GGUF model from inside kernel32 via the new run-nova / run-nova-nokvm Make targets
    • 🆕 PC speaker driver (beep support)

⏳ Upcoming Features (v0.12)

  • Kernel32: 32-bit RLX executable support (currently 16-bit apps only)
  • Kernel32: VMM module
  • Add new docs for kernel16 & kernel32.

❌ Current Limitations

  • No dynamic memory allocator
  • No 32-bit executable support (RLX loader is 16-bit only)
  • No write operations FAT12 support
  • No advanced networking stack
  • Disk access is CHS-only (no int 13h extensions)

📦 Hardware Requirements

  • CPU: x86 compatible (i386+ recommended)
  • RAM: 256 KB or more
  • Motherboard: BIOS-supported

🛠️ Quick Start & Build

Prerequisites

  • Compiler: nasm (Assembly), rustup + nightly toolchain (Rust)
  • Disk Tools: mtools (FAT12 image formatting via mformat/mcopy)
  • Objcopy: cargo-binutils (provides rust-objcopy)
  • (Optional) Emulator: qemu-system-x86_64

Linux & macOS

Option A: Automated setup

  • Run the installer script: It detects your distro/package manager and installs all toolchains and dependencies:
chmod +x setup.sh
./setup.sh

Use -aA/--always-agree to skip confirmation prompts, or -V/--verbose to see install logs. (Run ./setup.sh --help for all options.)

Option B: Manual setup

  1. Install base tools
  • Ubuntu/Debian example: sudo apt update && sudo apt install nasm mtools qemu-system-x86 curl
  • macOS example (via Homebrew): brew install nasm mtools qemu
  1. Install the Rust toolchain (all platforms)
    • curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    • rustup toolchain install nightly
    • rustup component add rust-src llvm-tools --toolchain nightly
    • cargo install cargo-binutils
  2. Build & Run via the Makefile
  • Only build OS image: make
  • Full cycle (build & run in QEMU): make run
  • Run with the NovaAI model loaded (requires KVM): make run-nova
  • Run with the NovaAI model without KVM (slow): make run-nova-nokvm
  • Build only the sample 16-bit apps into .rlx: make apps16

Windows

⚠️ Native Windows builds are no longer supported as of v0.03. Please use Linux, macOS, or WSL2 (Recommended) instead.

🔗 Links & 🙌 Contributing

Contributions of any kind are welcome:

  • 🐞 Report bugs.
  • 💡 Suggest new features or improvements.
  • 🔧 Help optimize or refactor code.

See Contributing.md for guidelines (it documents the module style, error convention and memory model this codebase follows), or open an issue / reach out via TikTok & Discord.

About

Light hybrid OS (NASM x86 & Rust) with Russian codebase

Topics

Resources

Contributing

Stars

56 stars

Watchers

7 watching

Forks

Releases

Contributors

Languages