Skip to content
Glyim logo

Glyim Documentation

A modular, from-scratch compiler for a Rust-like systems programming language — written in Rust.

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.

  • 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 inkwell with real ABI lowering and LTO, plus a stack-machine bytecode backend with its own VM.
  • Full toolchain — the glyim compiler driver, the Cargo-like glyip build 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.