Back to browse
GitHub Repository

Generating LLVM IR without malloc or external dependencies

108 starsC

Nibble

by glouwbug·May 14, 2026·102 points·25 comments

AI Analysis

●●●BangerWizardryBig BrainNiche Gem

Single-pass LLVM frontend in 3000 lines of C with zero heap allocations.

Strengths
  • Single-pass architecture removes AST overhead and external dependency requirements entirely during compilation.
  • Graphical demos provide proof of runtime viability with SDL2 rendering and multithreading.
  • Zero heap allocation strategy enforces disciplined memory management throughout the compilation process.
Weaknesses
  • Alloca in loops triggers stack overflows at high clang backend optimization levels.
  • Author marked project complete, limiting potential future feature development or bug fixes.
Target Audience

Systems programmers, compiler engineers

Similar To

TinyCC · LLVM · Oberon

Post Description

An attempt at a single pass LLVM frontend in ~3000 lines of C without external dependencies, malloc, or an AST. Included are some graphical examples. The IR isn't perfect, and the README touches on one particular downfall

Similar Projects

Gaming●●●Banger

Pebble, an open-source alternative to Minecraft: Java Edition

From-scratch Minecraft clone with hand-written Metal renderer and zero-dependency audio synthesis.

WizardryBig BrainZero to One
briangao
721mo ago
Developer Tools●●Solid

Lockstep – A data-oriented programming language

Compiler-enforced branchless SIMD execution guarantees vector saturation without runtime checks.

Big BrainNiche Gem
goosethe
864mo ago