
Glyim Documentation
Glyim implements a complete compilation pipeline: lexing, parsing, name resolution, HIR, MIR, type inference and trait solving, borrow checking, optimizations, and two code generation backends (LLVM and a custom bytecode VM). The project is organized as a Cargo workspace with more than 30 crates, designed for clarity, testability, and incremental development. Every stage is a self-contained crate with a narrow public API, so you can study and test each phase in isolation.
Choose your path
Section titled “Choose your path”Build your first project
Follow the golden path: build the compiler, scaffold a project with glyip, and run a Glyim program.
Solve a specific task
Use a how-to guide to manage dependencies, write tests, inspect intermediate representations, or tune codegen.
Look something up
Consult the reference for every CLI flag, glyip command, manifest key, lint, and language construct.
Understand the design
Read the explanation section to learn why the pipeline is split into crates and how ownership-driven reactivity works.
Feature highlights
Section titled “Feature highlights”- Rust-like language — generics, traits with associated types, pattern matching, closures with capture analysis,
async/await, declarative and procedural macros. - Real type system — inference with unification, trait solving with HRTB, auto-trait computation, monomorphization with polymorphization.
- NLL borrow checker — Polonius-style region inference, cross-block liveness, two-phase borrows, move analysis with partial moves.
- Two backends — LLVM 23 via
inkwellwith real ABI lowering and LTO, plus a stack-machine bytecode backend with its own VM. - Full toolchain — the
glyimcompiler driver, the Cargo-likeglyipbuild tool with dependency resolution and lockfiles, a language server, and a five-mode test harness. - GSX view syntax experimental — first-class, typed view elements with a dedicated compiler stage, ownership-driven reactivity, and an SSR emitter.
