Standalone systems language

LilScript

A statically typed language with C-style declarations, familiar JavaScript ergonomics, whole-program SSA optimization, and JavaScript plus native targets.

LilScriptv01.lil
class Vector {
  float x;
  float y;

  init(float x, float y) {
    this.x = x;
    this.y = y;
  }

  float lengthSquared() {
    return this.x * this.x + this.y * this.y;
  }
}

int[] values = [1, 2, 3, 4];
auto doubled = values.map(
  (int value) => value * 2
);
int sum = 0;
for (int i = 0; i < doubled.length; i++) {
  sum += doubled[i];
}
Vector vector = new Vector(3.0, 4.0);
if (vector.lengthSquared() == 25.0) {
  print(`sum=${sum}`);
}
Optimized JavaScript111 bytes
var b=[1,2,3,4].map(a=>a*2|0);
var a=0,c=0;
while(a<b.length){
  c=c+b[a]|0;
  a=a+1|0;
}
console.log(`sum=${c}`)

Language design

Typed from the first token

Independent semantics

LilScript source is parsed and checked as LilScript. JavaScript is a backend target, not the language definition, and TypeScript is not part of the pipeline.

Familiar surface

Arrays expose typed map, filter, reduce, and mutation methods. Structs, classes, closures, templates, and C-style control flow are built in.

Explicit boundaries

Whole-program analysis assumes a closed world. Host interaction uses typed extern declarations so escaping values receive a stable boundary representation.

Compiler architecture

One typed IR, every target

  1. 01FrontendLogos lexer, arena parser, symbols and type checking
  2. 02SSACFG lowering, mem2reg, phi insertion and escape analysis
  3. 03OptimizePropagation, value numbering, inlining, devirtualization, SRA and DCE
  4. 04EmitMinified JavaScript, portable C and a native executable together

Measured output

Bundle efficiency is tested, not assumed

The generated catalog currently covers 38 compiler applications and library/runtime surfaces, realistic application scenarios, property-mangling stress, and mechanically paired sources across 168 artifact lanes. Every published row names its compatibility boundary and codec.

Fair lanes

Vite unminified, Vite/Oxc, private-property Terser, Closure ADVANCED, and three LilScript policies stay separate.

Independent codecs

Raw, gzip-9, and Brotli-11 remain visible even when the configured release objective selects only one.

Source attached

Every local project detail is generated from the exact JavaScript and LilScript files used by its harness.