ZZust

Runtime

From script files to JIT functions and GPU kernels

The Zust workspace combines the language frontend, dynamic value model, JIT VM, object tree, GPU backends, and editor tooling for embedding scripts in real Rust systems.

cargo check --workspace
cargo run -p vm --example minimal_vm
cargo run -p zusts

parser / compiler

The parser uses hand-written lexical analysis and recursive descent parsing. The compiler handles AST-to-IR lowering, symbols, and type inference.

Dynamic model

The `dynamic` crate provides values for lists, maps, structs, bytes, typed vectors, JSON, and MessagePack. Normal script syntax lowers through runtime helper methods.

VM and Cranelift JIT

`zust-vm` imports source and compiles functions. Host Rust code can retrieve function pointers and call stable script paths as native functions.

root object tree

`root` is an addressable object tree for adding, reading, and updating runtime objects, lists, and maps. Redis and local storage mounts are supported.

GPU backends

The `gpu` module exposes SPIR-V compile/check, Metal compile/check, Vulkan run, and Metal run entry points. Shader compilation can be used without runtime dispatch.

LSP and editor support

The repository includes `zust-lsp`, a Zed extension, and a tree-sitter grammar for common `.zs` syntax.