Active development · v0.1

Code that reads like you think.

code-lang is a general-purpose interpreted language built in Rust — fast to learn, with first-class functions, structs, and a complete standard library.

hello.cl
import "fmt";
import "math";
import "strings";

struct Point {
    x: 0,
    y: 0,
}

let distance = fn(p) {
    return math.sqrt(p.x ** 2 + p.y ** 2);
};

let p = Point { x: 3, y: 4 };

fmt.print("point:", p.x, p.y);
fmt.print("distance:", distance(p));
fmt.print("tag:", strings.to_upper("code-lang"));

Why code-lang

Everything you need, nothing you don't.

⟨ ⟩

Familiar syntax

C-style braces, fn, let/const. Reads like the languages you already know.

λ

First-class functions

Functions are values. Closures, higher-order, recursion — all built in.

Structs

Define types with default fields. Dot-notation access. No boilerplate.

12 stdlib modules

math, strings, arrays, fs, http, json, time, rand, os, hash, path, fmt — ready to import.

Module system

Import any stdlib module or your own .cl files. Flat, simple, no surprises.

Precise errors

Every error shows the source line and a caret — you see exactly where it went wrong.

Install

Build from source
git clone https://github.com/Walon-Foundation/code-lang
cd code-lang
cargo build --release
Run it
# Start the REPL
./target/release/code-lang

# Run a script
./target/release/code-lang hello.cl

Requires Rust (stable).