Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Crush Banner

Crush Logo The Crush Language Guide

Crush is a capability-based, polyglot programming language and virtual runtime. It lets you write in multiple languages (Python, Rust, Bash, C, Go) within a single program while enforcing fine-grained security through an explicit capability system.

What this guide covers

SectionWhat you’ll learn
Crush LanguageSyntax, types, control flow, functions, capabilities, polyglot embedding
CASTThe intermediate AST format that walkers produce
CASMThe stack-based bytecode the VM executes
AppendixGlossary, quick reference, language comparisons

The compilation pipeline

Source (.crush / .py / .rs / ...)
         │
    Walker (language-specific)
         │
    CAST  (Crush AST — JSON)
         │
    Crush Compiler
         │
    CASM  (Crush Assembly — JSON / binary .castb)
         │
    crush-vm  (CVM1 — bytecode VM)

Hello, Crush

Run in Codebucket (Codespaces)

fn main() {
    io.print("Hello, Crush!");
}

The @ prefix marks a capability call — a crossing of the VM boundary that requires an explicit permission in the program manifest.

Where the source lives

The language implementation is the standalone crush-ast repository, extracted from the exosphere agent-native OS monorepo on 2026-06-12. It contains the CAST intermediate representation, tree-sitter grammar, polyglot walkers, compiler frontend, VM runtime, package manager, and installer.

The upstream exosphere project retains a subprocess-based walker registry that invokes the crush-ast walker binaries, and its own crush-cast/casm/nanovm crates for the Crush language compiler running inside the agent-native OS.

License

Licensed under either of MIT or Apache License 2.0 at your option.