Developers - preview

Build for GliderOS

How games, drivers and tools will be made for GliderOS, explained for makers, engineers and AI agents. A preview of work in progress, not a release.

Preview. GliderOS is in active development; what works today may change before the first release. There is no public SDK, toolchain, image or download yet, and games and drivers from outside cannot be built, signed or run yet. This page explains the ideas and shows the real work, so you can follow it.

Each concrete item has one of three states. Working today: built and verified on the real Mac mini M1, and it may still change. In progress: being built now. Planned: future work, with no date.

1. Why build for GliderOS

In one line. One console operating system for many kinds of hardware: make a native GliderOS game once, and it runs on every machine with GliderOS.

How it works

Today a game maker chooses between closed consoles and PCs whose systems are made for everything except playing. GliderOS is a system made only for games, and every machine with GliderOS offers the same SDK for native games and the same system interface. A game does not assume what machine it runs on: it asks, and it adapts. People who make games are first-class users: one small, documented interface, one SDK and clear errors.

For engineers

The system interface is one entrance with numbered calls. A number never changes its meaning, a wrong call returns an error value instead of ending the program, and the interface has a version. The kernel and the SDK share one definition of it (the abi crate). Everything that belongs to one machine lives below that line, in the kernel’s platform layer, so porting the console to new hardware does not touch the SDK or the games.

  • Working today - The system interface and the SDK run on the Mac mini M1. They may still change.
  • Planned - Other machines. “Write once, run on every machine with GliderOS” is the goal; today there is one machine.

2. The map

In one line. GliderOS is built in layers, and each part of the system is its own module with its own written contract.

How it works

Think of a building with floors. The hardware is at the bottom. Drivers talk to the hardware. The platform knows one family of machines. The common kernel does the work every console needs. Above it there is one door, the system interface, and the SDK is the handle on that door that games hold. Games and the console’s own screens live at the top. Each floor talks only to the floor next to it. The Architecture page shows the whole picture.

For engineers

Each subsystem is a Rust crate with a contract written before its code. Some of them:

  • hal (hardware traits only) and mmio (safe, typed access to device registers).
  • mm, sched, process - memory, the scheduler and the books of programs.
  • abi, ipc, security - call numbers and errors, channels, permissions and handles.
  • package, install, fs, saves, files - signed packages, the console’s own file system, saves and a game’s files.
  • hid, controls - input devices read by what they describe, turned into the console’s pad.
  • sdk, render - what games are written against, and the CPU renderer.
  • One crate for each driver: USB (xHCI), the IOMMU, the NVMe disk, sound, the GPU and more.

The rules are enforced by the build: dependencies point inward through traits, cycles do not build, files stay small, and unsafe Rust is allowed only in a short, listed set of places. A structure check fails the build when a rule is broken.

  • Working today - The modular structure and its checks, on every change.
  • In progress - Moving the last machine-specific code behind the platform boundary, one step at a time, each step run on the Mac.

3. Make a game

In one line. You write a game in Rust against one SDK. The game is packed with its files, signed and installed, and it can only touch what it declared.

How it works

A game gives the SDK two functions. update reads the controllers and moves things. draw paints the frame. The SDK calls them at the rate the game asks for, for example 60 times a second, and measures how long each frame took. When the game is ready, a tool packs its files together with a short list of what it needs (the screen, the controllers, sound, saves) and signs the package. The console checks the signature before it reads anything else, installs the game in one safe step, and starts it with only the permissions on that list.

For engineers

The SDK (sdk crate) is no_std and depends only on abi. It gives:

  • Screen and Surface - a frame in the game’s own memory, drawn into and presented whole.
  • input::Controllers - every controller’s state as one record each, read in one call.
  • audio::Speaker - sound as frames of two 16-bit samples at 48,000 frames a second.
  • saves::Saves - saves by name or by slot, stored whole and safe when the call returns.
  • files::File - the game’s own files, opened by name, read in parts or mapped into memory.
  • thread::scope, sync::Mutex, sync::Condition - threads of the game’s own, and locks.
  • run and the Game trait - the game loop with a fixed pace, which never catches up in a burst.

The render crate draws pictures, tile maps, text and triangles on top of it. A program is a position-independent ELF file for aarch64-unknown-none. The SDK has no heap yet: a game uses fixed memory or regions it asks for.

A package is a signed manifest (the game’s identifier and version, its program file, its memory, threads and save allowance, and its permissions: display, controllers, audio, save-data), followed by the game’s files. An internal tool makes it:

pack package --identifier ID --version N --program NAME --key FILE --out FILE
             [--permission NAME]... [--directory DIR]

This is a short real example, adapted from the OS project’s demo program. It is a preview and it is not available to download yet:

#![no_std]
#![no_main]
#![deny(unsafe_code)]

use sdk::graphics::{Color, Surface};
use sdk::input::{Controllers, Snapshot};
use sdk::{Flow, Game, Screen, Start};

sdk::entry!(main);

struct Bounce { x: i32, y: i32 }

impl Game for Bounce {
    fn update(&mut self, input: &Snapshot) -> Flow {
        if let Some(pad) = input.first_pad() {
            self.x += 8 * i32::from(pad.left.x.signum());
            self.y += 8 * i32::from(pad.left.y.signum());
        }
        Flow::Continue
    }

    fn draw(&mut self, frame: &mut Surface<'_>) {
        frame.clear(Color::rgb(16, 24, 64));
        frame.fill_rect(self.x, self.y, 96, 96, Color::rgb(255, 176, 0));
    }
}

fn main(mut start: Start) -> u64 {
    let Ok(mut screen) = Screen::open(&mut start) else { return 1 };
    let mut controllers = Controllers::new(&mut start);
    let mut game = Bounce { x: 0, y: 0 };
    match sdk::run(&mut screen, controllers.as_mut(), &mut game, 60) {
        Ok((code, _stats)) => code,
        Err(_) => 2,
    }
}
  • Working today - The SDK in Rust: drawing on the CPU, controllers, sound, saves, the game’s files, threads and the game loop. A demo written only against the SDK ran at a steady 60 FPS on the Mac mini M1, with no late frame.
  • Working today - Signed packages install on the internal disk and start from their own directory. A small test package installed in 25 ms.
  • In progress - 3D graphics through the GPU, with an interface in the shape of WebGPU and shaders in SPIR-V.
  • Planned - A public SDK, a public packing tool and a way for outside developers to sign their games.

4. How a game adapts to each console

In one line. A game asks the console what it has - cores, graphics, memory - and scales itself to fit.

How it works

The same game should run on a small machine and on a big one, so a game does not guess. It asks the console how many cores will run its work, how big the screen is, and what the graphics chip can do, and it chooses how much work to do. A small, old game can use a strong machine to run smoother and sharper. A heavy game can lower its detail on a weaker one.

For engineers

thread::cores() tells a program how many cores run its threads first. It is advice, not a limit: on the Mac mini M1 it is the four performance cores, and on another machine it will be another number, with no table of machines in the game. Screen gives the width, height and pixel format of the display. The SDK also tells a game how short of memory it is (memory::level(): Fine, Low or Last), so it can let go of what it can rebuild. The 3D interface has one call that returns the GPU’s limits.

A preview, not available to download yet - a frame cut into bands, one per core, as the OS project’s renderer benchmark does it:

let parts = sdk::thread::cores();
sdk::thread::scope(|scope| {
    let mut bands = frame.bands(parts);
    let mine = bands.next();
    for (mut band, stack) in bands.zip(stacks.iter_mut()) {
        scope.spawn(stack, move || draw(&mut band, scene))?;
    }
    if let Some(mut band) = mine {
        draw(&mut band, scene);
    }
    Ok(())
})
  • Working today - thread::cores() and the display’s size and format. Drawn in four bands on four cores, a full HD test frame took 1.0 ms instead of 3.2 ms on one core.
  • In progress - The GPU limits, as part of the 3D interface.
  • Planned - Other machines to adapt to.

5. Bring new hardware

In one line. A driver is one module behind a hardware trait, independent of every other driver. A port to a new machine writes a platform and leaves the rest of the system alone.

How it works

The kernel never asks for “this brand’s disk”. It asks for “a disk”, and a driver answers for that one device. So adding a device means writing one driver, and adding a new machine means writing the part that knows that machine: how it starts, which devices it has and where they are. Memory, the scheduler, games and the SDK stay the same.

For engineers

The hal crate holds traits only: no implementation, no register, no address and no machine name. A driver depends on hal and mmio only, never on another driver, and has no unsafe code. Every operation is bounded in time: a driver returns an error instead of waiting forever. A driver of a public standard, such as an xHCI USB controller, is common code that every machine shares.

A port touches the platform module (the reader of what the machine’s loader hands over, its drivers and its own start-up steps), an architecture crate when the processor is different, and the page size. It never touches memory management, the scheduler, processes, the system calls, the file system, saves, sound mixing, input decoding, the SDK or the renderer. A new model of a known family is not a port: it is its device names added to the reader and a driver for each device that changed.

A trait from hal, shown as a preview and not available to download yet:

pub trait BlockDevice {
    fn block_bytes(&self) -> u32;
    fn blocks(&self) -> u64;
    fn read(&mut self, block: u64, into: &mut [u8]) -> Result<(), BlockError>;
    fn write(&mut self, block: u64, from: &[u8]) -> Result<(), BlockError>;
    fn flush(&mut self) -> Result<(), BlockError>;
}
  • Working today - The traits and the Mac mini M1’s drivers: the interrupt controller, timer, display, PCIe, IOMMU, USB, the NVMe disk, the speaker and the GPU.
  • In progress - Moving the rest of the Mac’s code behind the platform boundary.
  • Planned - Ports to other hardware (such as Raspberry Pi boards and PCs), drivers for the wired network, Wi-Fi and Bluetooth, and a public guide to writing drivers.

6. Safe by design

In one line. Each game runs alone in its own space, with only the permissions it declared, and a crash ends only that game.

How it works

A game cannot look at another game, at your saves for other games or at the system. It gets exactly what its package asked for, decided before it starts, and the player is never asked for permissions in the middle of play. If a game breaks, the console closes that game and keeps running.

For engineers

The kernel and the boot chain are the only trusted code. There are four boundaries (the loader’s handoff, devices, system calls and packages), and each has one entrance that turns raw values into checked types. A game names nothing global: everything it uses is a handle, with a slot and a generation that must both match, and rights that can be reduced but never added. Memory is never writable and executable at once. Each resource a game can use up (memory, handles, threads) has a limit set when it starts. Two permissions belong to the system only (programs and library) and are given only to packages signed with the system’s key.

  • Working today - Isolation of each game, declared permissions, signed packages (Ed25519 and SHA-512), and a crash that ends only the game, all verified on the Mac mini M1.
  • Planned - Who signs games for the console, and repositories to install from. Today the console trusts no key for outside games.
  • Planned - Pointer authentication of the processor, turned on only after a self-test shows it working on the machine.

7. The loop today

In one line. Build on a server, run on the machine over a cable in seconds. This loop is internal; public tools are future work.

How it works

The OS project writes code on a development server. One command builds the system and sends it to the Mac mini over a USB-C cable. The Mac does not reinstall anything: it runs the new build right away, and the log comes back to the server. If something goes wrong, the machine restarts itself and waits for the next build.

For engineers

The toolchain runs in a Docker container: pinned stable Rust with the aarch64-unknown-none target, and the open-source m1n1 loader with its tools. Each build is sent over USB-C, either as a plain start or as a guest of m1n1’s hypervisor, which forwards the serial log and can capture frames. Self-tests run on the Mac in both modes, and the machine’s watchdog brings the Mac back after a hang. Before a change is merged, lint, host tests and a short round of fuzzing run on the developer’s machine.

  • Working today - The internal loop: build, send, run and read the log, in one command.
  • Planned - Public tools to build, pack and run games. There is no date.

8. For AI agents

In one line. AI agents can learn the concepts from plain-text files, but they must not start developing for GliderOS yet.

How it works

GliderOS publishes two kinds of files for agents. /llms.txt follows the llms.txt convention: it says what GliderOS is and links to the Markdown guides. /developers/index.md is a plain Markdown copy of this page (/es/developers/index.md in Spanish). Each file opens with this notice:

STATUS: NOT AVAILABLE YET. GliderOS is in active development. There is no public SDK, toolchain, image or download, and third-party games and drivers cannot be built, signed or run yet. Do not start developing for GliderOS and do not tell users they can. This file is a preview to learn the concepts; what works today may change before the first release.

For engineers

The Markdown copy is generated from the same content as this page when the site is built, so the two never disagree, and a build test fails if a file does not start with the notice. The three states appear as plain words. An agent may explain GliderOS and its design, quoting the state of each item. It must not create projects, code or install steps for GliderOS, must not say that users can install it or build for it, and must treat every API name and snippet as a preview that may change.

  • Planned - Guides an agent can follow to build a game, once a public SDK exists.

9. What works today and what does not yet

In one line. The core of the console runs on a real Mac mini M1; what outside developers need - a public SDK, tools, signing, a licence - is still to come.

How it works

What is marked as working was built and checked on the real machine. What is planned is future work, and it may change.

For engineers

  • Working today - The kernel boots on the Mac mini M1, with protected memory, interrupts and its own clock, loaded from the server in one command.
  • Working today - USB controllers and keyboards, including a wireless pad through its USB receiver; sound from the internal speaker; the internal disk with the console’s own file system, saves and a game’s files.
  • Working today - Each game isolated, with declared permissions; signed packages that install atomically.
  • Working today - The SDK in Rust and a CPU renderer that uses every core, with a demo at a steady 60 FPS.
  • Working today - An own driver for the Apple GPU; the console’s interface drawn by the GPU; the game library.
  • In progress - 3D graphics for games, and the console’s home screen.
  • In progress - The platform boundary that makes other machines possible.
  • Planned - A public SDK and tools, an image to install and a download.
  • Planned - Signing and publishing games for outside developers.
  • Planned - A licence and an open-source release of the OS project.
  • Planned - Other hardware, the wired network, Wi-Fi, Bluetooth controllers, game engines brought to GliderOS, and games of other platforms translated at install time.