Z Zust
Zust BigFloat Mandelbrot GPU rendering

The dynamic language for AI-native software

Make AI-written code actually run

Zust is a dynamic runtime language for agents, toolchains, and host systems: structured like Rust, hot-swappable like a script, and able to move toward Cranelift JIT, native host functions, and GPU backends.

AI-generation friendly Dynamic boundary Native JIT GPU-ready
pub fn agent_task(ctx) {
    let plan = ctx.goal;
    let tools = root::get("local/tools");

    for step in plan.steps {
        let result = tools[step.tool](step.input);
        ctx.memory.push(result);
    }

    ctx.memory
}

Why AI needs a new scripting layer

Models can write code. Systems need a runtime that can absorb it.

As agents generate workflows, data transforms, tool calls, and compute kernels in real time, the old write-compile-deploy loop becomes too rigid. Zust turns AI-generated intent into scripts that can be reviewed, hot-swapped, evolved, and compiled into native functions when performance matters.

01

Easier for AI to get right

Rust-shaped blocks, functions, structs, and `impl` give code a skeleton. Removing borrow checking and explicit `mut` makes generation and human editing more direct.

02

Built for tool orchestration

`Dynamic` covers maps, lists, bytes, typed vectors, JSON, and MessagePack. Agent context, tool results, and external API payloads can enter the runtime naturally.

03

More than glue code

`zust-vm` compiles modules with Cranelift and hands function pointers to host Rust. Start dynamic, then accelerate the paths that become important.

04

Toward GPU and computation

The same language surface is used for CPU JIT, SPIR-V, Metal, and Vulkan experiments. AI can generate not only business logic, but inspectable computation.

AI-native runtime layer

Future software will not be only “source code written by humans.” It will generate, evaluate, replace, and execute itself.

Zust aims to be the controllable language layer in the middle: more expressive than JSON workflows, more hot-swappable than a full systems language, and more durable than one-off prompts.

Open source on GitHub

Zust is an open repository, not a closed-door pitch deck.

The parser, compiler, VM, Dynamic model, GPU backends, LSP, and example scripts live in one workspace. Clone it, run it, inspect the implementation, or embed it in your own Rust system.

github.com zhuchuanjing/zust Read the source, examples, and development progress

Language overview

Start dynamic. Add structure when it matters.

`.zs` files support functions, generics, structs, `impl`, closures, imports, pattern bindings, expression-oriented control flow, loops, and compound assignment. The goal is compact scripts that still have a maintainable shape.

Functions Structs Generics Closures Dynamic map/list GPU vector
struct Point {
    x: f64,
    y: f64,
}

impl Point {
    pub fn len2(self: Point) {
        self.x * self.x + self.y * self.y
    }
}

pub fn demo() {
    let p = Point{x: 3.0, y: 4.0};
    p.len2()
}

Runtime and backends

One language, multiple execution paths

The workspace includes parser, compiler, VM, root, llm, SPIR-V, Metal, Vulkan, LSP, and editor integrations. Zust can be a scripting layer inside Rust apps or a high-level description for compute kernels.

pub struct BigFloat<N> {
    sign: bool,
    exp: i32,
    data: [u32; N],
}

impl BigFloat<N> {
    pub fn zero() {
        BigFloat<N>{
            sign: false,
            exp: 0,
            data: [0u32; N],
        }
    }

    pub fn add(self: BigFloat<N>, rhs: BigFloat<N>) {
        // same script shape, CPU JIT or GPU backend
        bigfloat_add(self, rhs)
    }
}

parser / compiler

Hand-written lexical analysis, recursive descent parsing, AST-to-IR compilation, symbol tables, and type inference.

vm / dynamic / root

Cranelift JIT, dynamic value model, addressable object tree, and storage abstraction.

vm-spirv / vm-metal / vulkan

GPU backends for SPIR-V generation, Metal source generation, and Vulkan dispatch.

llm / zust-lsp

Generic model-call helpers, `.zs` language server, and Zed editor extension.

Quick start

Embed Zust in a Rust project

The minimal flow imports source code, requests a compiled function pointer, and calls it as a native function. See `vm/examples/minimal_vm.rs` in the repository.

cargo check --workspace
cargo run -p vm --example minimal_vm
cargo run -p zusts
Source GitHub Repository Language Syntax and Dynamic Backends JIT / GPU / LSP