Ube is engineered specifically for high-level games, modern applications, CLI tools, and high-throughput backends.
Achieve deterministic memory safety without garbage collection and without lifetime annotations ('a).
$ curl -sSL https://raw.githubusercontent.com/JohnEsleyer/ube/main/install.sh | bash
Select a core concept below to inspect clean, idiomatic Ube code.
Stop trading performance for safety. Ube replaces garbage collection and borrow-checker gymnastics with three deterministic, compile-time layers.
Primitives (i32, f32, bool), fixed arrays ([N]T), and value structs. Copied by value or passed with disjoint mutable references.
arena { })Strings, dynamic slices ([]T), and temporary scratch data. Rewound in 1 single CPU instruction on scope exit. Cross boundaries safely using promote(x).
Pool[T])Dynamic game entities, nodes, and state machines. Generational index handles (Handle[T]) prevent stale or use-after-free access via affine compile-time consumption.
A fresh, grounded balance of developer joy, real-time speed, and rock-solid safety.
The unsafe keyword and raw pointers (*T) are permanently excluded. Programs compile directly to Wasm/WASI and run identically on browser canvas, edge workers, and game runtimes.
No 'a lifetime puzzle or compiler borrow fights. Memory safety is guaranteed via affine move semantics, scoped bump arenas, and generational handles.
Spawn lightweight concurrent tasks with spawn, stream messages over typed buffered channels (Chan[T]), and multiplex with select. Flat-type rules prevent data races.
No hidden operator overloading. No implicit conversions. No mid-frame GC pauses spiking p99 latencies. Every allocation, movement, and boundary is explicit in source code.
Discover syntax ➔First-class support for game loops, entity pools, string manipulation, web canvas rendering (ube build --html), and ultra-low latency event loops.
Clean grammar and explicit scoping enable LLMs to inspect, reason about, and generate Ube code with near-zero hallucinations. Includes ube guide and ube context.
Learn Ube concept by concept. Each guide includes clear mental models, verified syntax examples, and common compiler pitfalls to watch for.
Immutability with let, mutability with let mut, primitives, string interpolation f"hello {name}", slices []T, and defer.
Value receivers vs mutable receivers (fn (mut p Player)), struct literals, visibility with pub, and why Ube eliminates closures.
Regional arenas (arena { }), instant O(1) reclamation, the upward reference invariant, promote(), and entity pools (Pool[T]).
Explicit result types T ! E, the ? propagation operator, or_else fallback defaults, optional T?, and if let unwrapping.
Fiber tasks with spawn, typed channels Chan[T], multiplexing with select, and the compile-time Flat Type Invariant.
Tagged unions with variant payloads, exhaustive pattern matching with match, monomorphized generics Box[T], and dynamic traits.
Zero unsafe architecture, typed host imports (extern fn), building Web Canvas apps, and complete CLI command reference.
Everything you need is built straight into the single ube binary.
| Command | Example | Description |
|---|---|---|
ube run |
ube run main.ube |
Compiles to WebAssembly and runs in a Wasm runtime (wasmtime, wasmer, node, deno, wasm3). |
ube build |
ube build main.ube |
Builds a sandboxed WebAssembly / WASI module (main.wasm) by default. |
ube build --html |
ube build main.ube --html -o app.html |
Packages a browser-ready Web Canvas / HTML5 game with embedded Wasm runtime. |
ube check |
ube check main.ube |
Statically audits types, memory regions, ownership, and sandbox purity without emitting output. |
ube test |
ube test tests/ |
Discovers and executes all test files and test_* functions. |
ube fmt |
ube fmt -w . |
Canonical code auto-formatter for all .ube source files. |
ube doc |
ube doc main.ube |
Generates API documentation for all public declarations and method signatures. |
ube lsp |
ube lsp |
Starts the Language Server Protocol for VS Code, Zed, and Neovim integrations. |
ube guide |
ube guide |
Dumps the AI Reference Specification (ube_guide.md) to stdout or disk. |
ube context |
ube context . -o ctx.txt |
Bundles project architecture context for LLM agents and prompt pipelines. |