Skip to content

Repository files navigation

Mia

₊˚ Elle ♡︎

Elle is a procedural programming language built in Rust which compiles to the QBE backend. There is also a mirror of this repository on SourceHut.

✩ It is heavily recommended to read the FAQ before trying the language. It will allow you to grasp the strengths and weaknesses of the language at a glance and quickly learn whether this language is one you would be comfortable using.

✩ You can view the Elle documentation here. Please note the language is still in active development and documentation is due to change at any time with no warning.

♡ Hello, World!

use std/prelude;

fn main() {
    $println("Hello world!");
}

♡ AOC2025 Day 12 Solution (source)

use std/prelude;

fn solve(string[] blocks) {
    sizes := blocks.slice(0, 6).iter().map(fn: it.iter().map(fn: it == '#').sum()).collect();
    total := 0;

    for part in blocks[6].nums<i32>().iter().chunks(8).map(fn: it.iter()) {
        area := part.take(2).product();
        total += area > sizes.iter().zip(part).map(fn: it.x * it.y).sum();
    }

    return total;
}

fn main(string[] args) {
    blocks := io::read_to_string(args[1]).split("\n\n");
    $dbg(solve(blocks));
}

♡ Basic echo server (source)

use std/prelude;
use std/net/tcp;

let BUF_SIZE = 1024;

fn main() {
    server := TcpServer::bind(port := 8080);

    while server.is_err_and(fn: it == Errno::EADDRINUSE) {
        server = TcpServer::bind(port += 1);
    }

    server := server.unwrap();
    defer server.close().unwrap();
    $printf("Server is listening on port {}", port);

    connection := server.accept().unwrap();
    defer connection.close().unwrap();
    buf := Array::bytes(BUF_SIZE);

    while (_, received := connection.read(buf)) && received != 0 {
        $printf("Received {} bytes: {}", received, buf.join("").replace("\n", ""));
        connection.write(buf).expect("Failed to send response");
    }
}

♡ Projects made in Elle

Project Description Image More
Raytracer A pathtracer experiment using Raylib & OpenGL rendering scenes with up to 4.4 million triangles. view
Black Hole A simplified black hole simulation in real time using Raylib and OpenGL. view
Peephole A speculative dystopia horror game designed around looking through a peephole. view
AOC2025 All Advent of Code problems in 2025 completed in Elle, running in 404.1ms ± 3.6ms cumulatively on an M4 MacBook Air. view
Pomee A 4-key 2D Virtual Scroller Rhythm Game with original music view

♡ How to run

Important

Ensure you have Rust, Cargo and the QBE compiler backend.

git clone https://github.com/acquitelol/elle
cd elle

(does not require root)

make

to install the compiler, standard library, and runtime (installs into ~/.local/ by default)

Add the compiler executable to your $PATH:

export PATH="$HOME/.local/bin:$PATH"

OR

  $ make compile-release

to get only a compiler executable and not install anything.

♡ You can now run ellec to get a help message of how to use the compiler!

Try compiling a simple example!

ellec ./examples/hello.le --run

Try compiling an example with libraries!

ellec ./examples/graphics/newton.le -z -lraylib --run

♡ Licensing

⇡ Back to top️!

About

A procedural programming language built in Rust which compiles to QBE

Topics

Resources

Stars

118 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages