parser / compiler
The parser uses hand-written lexical analysis and recursive descent parsing. The compiler handles AST-to-IR lowering, symbols, and type inference.
Runtime
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
The parser uses hand-written lexical analysis and recursive descent parsing. The compiler handles AST-to-IR lowering, symbols, and type inference.
The `dynamic` crate provides values for lists, maps, structs, bytes, typed vectors, JSON, and MessagePack. Normal script syntax lowers through runtime helper methods.
`zust-vm` imports source and compiles functions. Host Rust code can retrieve function pointers and call stable script paths as native functions.
`root` is an addressable object tree for adding, reading, and updating runtime objects, lists, and maps. Redis and local storage mounts are supported.
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.
The repository includes `zust-lsp`, a Zed extension, and a tree-sitter grammar for common `.zs` syntax.