Skip to content

Repository files navigation

JUnE OS

build

A next-generation, AI-integrated open-source operating system, written from scratch in Rust. It boots in QEMU, brings up a real graphical Ubuntu-style desktop with a window manager and five interactive apps, and runs a live in-kernel AI agent (JUNE) — all inside your own microkernel.

JUnE OS is built for education and exploration: the kernel, the desktop, and every app run in a single bootable image you can build and run on your Mac or Linux machine.

What's inside

  • Graphical desktop (320x200 VGA mode 13h) — Ubuntu aubergine→orange wallpaper, top bar with clock/Wi-Fi/battery, app dock with running indicators, desktop icons, and a JUnE OS logo — all rendered with a custom 256-colour palette and flicker-free backbuffer.
  • Window manager — draggable-style cascading windows, focus ring, close buttons, q/Esc/Backspace to close, Down arrow to switch focus.
  • Five interactive apps (launch with keys 15):
    • 1 Terminal — live kernel log console
    • 2 Files — browsable file/directory listing
    • 3 Settings — Wi-Fi / Bluetooth / theme / screen / CPU rows + brightness
    • 4 JUnE AI — usage-based prediction of which app you'll open next
    • 5 System Monitor — live tasks, heap, request counters, uptime, clock
  • Microkernel core — cooperative async executor, IPC channels, syscall registry, ring-3 user mode with ELF loading and int 0x80 syscalls.
  • Security hardening — SMEP/SMAP (where available), GDT with IST for double faults, kernel panic / page-fault screens, verified user-ELF loading (SHA-256).
  • Persistent JUnE database — on-disk storage engine with mirrored superblock, checksums, and compaction for the AI's learned history.
  • CI — a GitHub Actions workflow builds the bootable image on every push.

Quick start

Prerequisites (macOS):

brew install qemu
rustup toolchain install nightly --profile minimal --component rust-src
rustup component add llvm-tools-preview --toolchain nightly
cargo install bootimage

Run:

./run.sh

run.sh builds the bootable image with cargo bootimage and launches it in a QEMU window with the serial console attached to your terminal.

Using the desktop

Key Action
15 Open Terminal / Files / Settings / JUnE AI / System Monitor
Down arrow Switch focus to the next window
q, Esc, Backspace Close the focused window
Ctrl+Alt+g Release the mouse from QEMU
Ctrl+Alt+f Toggle fullscreen (Zoom from the QEMU View menu also works)

Releases & packages

Run the prebuilt image with Docker

docker run -p 5900:5900 ghcr.io/sunritb/juneos-os:latest

Then open VNC at localhost:5900 to see the desktop (no QEMU or Rust installation needed). If you have a local X server, the container also uses SDL when DISPLAY is set.

Project layout

kernel/
  src/
    main.rs           entry point, boot sequence, panic handler
    serial.rs         COM1 serial console
    vga.rs            VGA text buffer + log capture (used by the Terminal app)
    gfx.rs            graphical desktop, window manager, all app UIs
    gdt.rs            GDT + TSS with interrupt stack table
    interrupts.rs     IDT, PIC remap, PIT timer (1000 Hz), exception screens
    memory.rs         16 MiB heap + global allocator
    frame_allocator.rs physical frame allocator
    paging.rs         page-table setup
    task/mod.rs       cooperative async executor, sleep/yield
    ipc.rs            message-passing channels
    syscall.rs        syscall registry
    ai.rs             JUNE agent: learns launcher events, predicts apps
    june_db.rs        persistent on-disk database (mirrored superblock)
    security.rs       SMEP/SMAP hardening
    sha256.rs         SHA-256 used for user-ELF verification
    user.rs           ring-3 user mode: ELF loader + int 0x80 syscalls
    rtc.rs            real-time clock (used by the top-bar clock)
    keyboard.rs       PS/2 keyboard driver (interrupt-safe event queue)
    disk.rs           ATA driver for the persistent database
  linker.ld           kernel linker script
user/
  src/                ring-3 user-space programs (separately linked ELF)
run.sh                build + run in QEMU

Architecture notes

  • Pure no_std / no_main Rust, x86_64-unknown-none target with build-std for core/alloc.
  • Boots via bootloader 0.9.35 (custom linker script, -C relocation-model=static).
  • Graphics uses VGA mode 13h (320x200, 256 colours) with a fully programmed DAC palette, so no drivers or BIOS are needed on the host.
  • Headless testing: qemu-system-x86_64 -display none -serial file:/tmp/s.log.

License

Licensed under the MIT License — free to read, learn from, modify, and use in your own projects.

About

JUnE OS: an AI-integrated open-source operating system written in Rust. Boots in QEMU with a graphical Ubuntu-style desktop, window manager, 5 built-in apps, ring-3 user mode, and a persistent on-disk database.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages