About the project · Open source · MIT licensed

A high-performance language,built carefully.

Chuchu is a statically typed language with automatic type inference. Cheeku is the Rust compiler that turns it into native programs through LLVM. Both are young, both are open source, and this page is honest about what exists today — and what does not.

01 · TWO THINGS, TWO NAMES

Chuchu is the language. Cheeku is the compiler.

The names are easy to mix up, so it is worth being precise: one is the thing you write, the other is the thing that turns it into a binary.

THE LANGUAGE

Chuchu

A high-performance, statically typed language with inferred local types, explicit function signatures and checked numerical operations. It reads like plain sentences and compiles to native code.

hello.chuchuCHUCHU
assign greeting to 42
show greeting
$ cheeku hello.chuchu -o hello

THE COMPILER

Cheeku

The command-line compiler, distributed as the Rust crate chuchu. It type-checks first, then lowers through LLVM, optimises, and links a native executable with the system Clang.

  • Compiles and links; it does not run your program for you.
  • Reports errors with the source byte span that caused them.
  • Emits IR and assembly, or timings as JSON, when you ask.

02 · DESIGN PRINCIPLES

Four decisions that shape the whole language

Everything else in Chuchu follows from these. When a feature is ambiguous, they are the tie-breaker.

READABILITY

Statements that read like sentences

declare is assign, update is reassign, print is show. A program says what it does, so the reader never has to translate it first.

INFERENCE

Types inferred, not spelled out

Local variables take their type from the value you assign. Only function parameters and return types are annotated, where the contract actually matters.

SAFETY

Wrong programs never become executables

Static type checking rejects mismatches before a single instruction is generated, and runtime guards stop overflow, division by zero and out-of-range indexes.

NATIVE OUTPUT

Real optimisations, real binaries

Cheeku lowers to LLVM and links a host-native executable. Pick O0 through O3 and change the speed, never the behaviour.

03 · HOW CHEEKU WORKS

From a .chuchu file to a native executable

One compiler, one pipeline. Each stage hands a checked result to the next, and nothing reaches the LLVM backend that has not already passed the type checker.

  1. 01

    Lex

    The source becomes tokens — keywords, literals, symbols, newlines — each carrying the byte span it came from.

  2. 02

    Parse

    Tokens become an abstract syntax tree with precedence-based expressions, blocks, calls and indexing.

  3. 03

    Resolve

    A symbol table tracks lexical name lookup and scope, so shadowing and forward references resolve the way they read.

  4. 04

    Check

    The type checker infers local types, validates signatures, conditions, arrays, scope and returns, and collects function signatures before any body is checked.

  5. 05

    Lower

    Validated statements are lowered into an LLVM module: i64 integers, f64 floats, i1 booleans and fixed-size numeric arrays.

  6. 06

    Optimise

    The target triple and data layout are configured, then LLVM's O1 to O3 pass pipelines run. O0 skips the optional passes.

  7. 07

    Link

    A native object is emitted and handed to the system Clang linker. The executable is staged beside the destination and renamed only after linking succeeds.

THE WHOLE PIPELINE
.chuchu source
    ↓ lexer
tokens with byte spans
    ↓ parser
abstract syntax tree
    ↓ type checker + symbol table
validated program
    ↓ typed code generation
LLVM module
    ↓ target configuration + optimisation
host-native object
    ↓ Clang linker
executable

04 · UNDER THE HOOD

The details worth knowing

Language
Chuchu
Compiler
Cheeku
Implementation
Rust, Edition 2024
Backend
LLVM 23.1.x via Inkwell
Linker
System Clang
Types
i64 · f64 · i1 · numeric arrays
Optimisation
O0 through O3
Output
Host-native executable
Licence
MIT
Validated platform
macOS on Apple Silicon

05 · WHERE IT STANDS

What works today, and what does not

Chuchu is in early development. These are the current boundaries of the implementation, not a roadmap — the documentation is the source of truth.

IMPLEMENTED

  • Inferred local variables with typed reassignment
  • Signed integers, floats, booleans and homogeneous fixed-size numeric arrays
  • Arithmetic, comparisons, grouping and unary negation
  • if / else, while, lexical scope and block shadowing
  • Top-level typed functions, forward calls, recursion and mutual recursion
  • Numerical built-ins: abs, sqrt, min, max, sum, len
  • Scalar output through show
  • Native object emission and executable linking
  • O0–O3 optimisation, CPU selection, timing JSON, IR and assembly output
  • Runtime checks for integer arithmetic, division and array bounds

NOT YET

  • No strings, characters or comments yet
  • No for, break, continue or logical operators
  • No imports, user-defined types or file I/O
  • Arrays are 1–256 elements and cannot be assigned element by element
  • Function annotations cover scalars only
  • No language-level input API, JIT or automatic parallelism
  • Host-native only — there is no cross-OS target flag

The validated native environment is macOS on Apple Silicon. Linux and Windows builds exist, but the public docs do not yet claim native support for them.

06 · OPEN SOURCE

Built in the open

Chuchu is MIT licensed. The compiler, the documentation and this website all live in public repositories, and contributions are welcome — compiler behaviour, diagnostics, examples or docs.

See it for yourself.

Install Cheeku, compile the bundled example, and run a native program you built yourself.