Skip to content
Osinachi Nwagboso

Glang

Programming Language & Compiler

Code
github.com/sianachi/Glang
Live
glang.nwagboso.com
Role
Solo language & compiler design
Tags
  • Compilers
  • C
  • Self-hosting
  • Type Systems
  • Generics
  • Language Design
Stack
  • Glang
  • C runtime
  • Python reference implementation
  • TypeScript tooling
Compiler
Loader → analysis → monomorphisation → interpreter / C emitter
Bootstrap
Self-hosting · reproducible C seed · no GC

A statically typed, manually managed systems language with a self-hosting compiler, dual execution backends and a deliberately small runtime.

The production compiler — lexer, parser, typed AST, loader, semantic analysis and C emitter — is written in Glang itself and can bootstrap from a committed C seed using only a C compiler. The tree-walking reference interpreter and compiled backend are kept in lockstep through differential testing. The language includes classes, interfaces with vtable dispatch, monomorphised generics, tagged unions and pattern matching, nullable types, exceptions, closures, modules and an increasingly substantial standard library.