Lamina
A compiler backend that is not LLVM or Cranelift
Details
- External ID
- 45991146
- Source
- HN
- Company
- —
- Product
- LaminarDB
- Website domain
- github.com
- Launched
- Nov. 20, 2025
- Cohort
- —
- Upvotes
- 5
- Upvotes percentile
- 0.0982532751091703
- Tags
- —
- Fetched at
- Sept. 7, 2026, 9:25 p.m.
- Updated at
- Sept. 7, 2026, 9:25 p.m.
Description
Recently, I've been working on Lamina, a compiler infrastructure that generates native assembly for multiple architectures without relying on LLVM or Cranelift. It's designed for building compilers for new languages, educational projects, and any projects that can utilize a custom syntax of code generation.Instead of depending on external backends, Lamina provides a complete pipeline from a single SSA based IR directly to the supported target's assembly generation. The IR is readable, also provides a IRBuilder API that is easy to use via programmatic construction.For better management of the code generation process, in the future, it will use a new pipeline IR -> MIR -> native assembly with the optimization passes.Key features: - Direct code generation: IR -> assembly/machine code without LLVM/Cranelift - SSA based IR: single assignment form optimized for analysis and optimization passes - MIR based codegen(experimental): new intermediate representation with register allocation and advanced optimizations - IRBuilder API: fluent interface for building modules, functions, blocks, and control flow - Readable IR: easy to debug and lower than high level languages - Zero external backend dependencies: simplified builds and transparent pipeline while being faster to buildOptimization passes (experimental MIR flow only): - Control flow: CFG simplification, jump threading, branch optimization - Loop optimizations: loop fusion, loop invariant code motion, loop unrolling - Code motion: copy propagation, common subexpression elimination, constant folding - Function optimizations: inlining, tail call optimization - Arithmetic: strength reduction, peephole optimizationsPerformance: On a 256×256 matrix multiplication benchmark (300 runs), Lamina's experimental MIR-based codegen (which includes all optimization passes) generates code comparable to C/C++/Rust (within 1.8x) and faster than Java, Go, JavaScript, and Python. The experimental MIR based flow's result is much faster than the IR-> Assembly based codegen.Written in Rust (2024 edition), Current Version 0.0.7. Optional nightly features available for SIMD, atomic placeholders, and experimental targets.
Enrichment
- Theme
- developer tools and programming utilities
- Vertical
- Horizontal
- Function
- Model & infra
- Audience
- Developer
- AI stance
- Not AI
- Project type
- Hobby / open-source project
- Normalized one-liner
- compiler backend alternative to llvm
- Manually corrected
- False
Could you build this?
No Developing an independent compiler backend that generates multi-architecture machine code without relying on LLVM or Cranelift requires deep expertise in compiler theory, register allocation, instruction selection, and ISA specifications.
What it would actually take: The system requires implementing intermediate representation (IR) lowering, control flow graph construction, sophisticated register allocation algorithms (like iterated register coalescing), and direct machine code or assembly emitters for x86_64 and AArch64. This demands extensive low-level knowledge of CPU architectures, ABI standards, and optimization passes.
Discussion
No comments on this launch.
Competitors
Other products that read as similar to this one — 126 launches clear the similarity bar, closest 8 shown.
Attention rank: #124 of 127 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 17 days after the earliest competitor.
- Clx · hn · 2026-07-11 · 143 upvotes · similarity 0.48
- Xcc700: Self-hosting mini C compiler for ESP32 (Xtensa) in 700 lines · hn · 2025-12-26 · 154 upvotes · similarity 0.46
- Mach · hn · 2026-06-08 · 32 upvotes · similarity 0.45
- Self-growing neural networks via a custom Rust-to-LLVM compiler · hn · 2025-12-28 · 8 upvotes · similarity 0.43
- An application stack Claude coded directly in LLVM IR · hn · 2026-03-12 · 10 upvotes · similarity 0.43
- NetWasm · hn · 2026-09-29 · 5 upvotes · similarity 0.43
- loom · github · 2026-09-09 · 11 upvotes · similarity 0.41
- Eulix · hn · 2026-09-15 · 5 upvotes · similarity 0.41
Other launches for this product
Same idea, different domain
Nobody's really built a model & infra tool for Fintech yet.