eskiuv0.12.0
v0.12.0 · open source · MIT

Write it like a script. Ship it like C.

A self-hosting systems language on LLVM, with explicit memory and direct C interop. One compiler for desktops, the web and phones.

Install on macOS or Linux curl -fsSL https://eskiu-lang.org/install.sh | sh

Homebrew: brew install eskiu-lang/eskiu/eskiu · Windows and release archives

The Eskiu mascot, a grey tabby kitten with a ball of yarn

Why Eskiu

Fast

Native code through LLVM, with memory you manage and no garbage collector. A C library's structs and functions are called as they are, on every target.

C interop and ABIs
Reliable

Sum types checked to the last case, nullable pointers checked before use, defer for cleanup, and bounds, overflow and null checks with --safe.

Ownership and resources
Productive

Run a file like a script, with HTTP, JSON, files and processes in the standard library, packages in one command and an editor that knows your code.

Quickstart
In production

Running inside ViroReact.

ReactVision ships Eskiu in ViroReact: ≈85% less memory in its engine, the tracker behind its AR on the web, and its object detection on iOS and Android.

Used by ReactVision The Morrow Digital
What you can build

One language, from scripts to silicon.

The language

Familiar on the surface.

C's model of memory and data, with the checks and conveniences of a modern language, at no run-time cost.

Sum types, checked to the last case

An enum carries data per variant. Leave a case out of a match and it does not compile.

match parse_port("8080") {
    Port(p)         -> serve(p);
    InvalidRange(n) -> warn(n);
    NotANumber      -> fail();
}

Maths that reads like maths

Bounded generics are monomorphised; operator overloads resolve by operand type and compile to direct calls.

V3 operator +(V3 a, V3 b) { ... }
V3 operator *(V3 v, float s) { ... }

let mid: V3 = (a + b) * 0.5;

async, await and typed channels

One reactor on kqueue, epoll or WSAPoll: the same networking code runs on Linux, macOS and Windows.

async int sum_squares(Chan<int>* ch) {
    let a: int = await Chan_recv(ch);
    let b: int = await Chan_recv(ch);
    return a + b;
}

A standard library for scripts

Fetch over HTTPS, walk a directory, run a command, read JSON and CSV, with modules that ship with the compiler.

let r: Response;
fetch("https://api.github.com/repos/x/y", &r);
defer Response_free(&r);
println(JsonValue_as_cstr(json_get(
    Response_json(&r), "owner.login")));

The compiler is written in Eskiu too: the whole pipeline rebuilds itself to the same output through a three-stage bootstrap. How it bootstraps →

Packages

One eskiuc add away.

GPU compute and 3D, machine learning, compression, audio, fonts and JNI. A package that binds a C library brings it along: the first build downloads it and checks its SHA-256, so there is nothing else to install.

Browse the packages →
$ eskiuc add onnx --git https://github.com/eskiu-lang/onnx --rev v0.1.0
added onnx (commit 550e8aba4d22)
$ eskiuc run            # src/main.esk imports <onnx>
fetching onnxruntime for onnx from https://github.com/microsoft/...
1.31.0
Playground

Try it in the browser.

Edit the program and run it. The server compiles it with LLVM through the same eskiuc run.

⌘/Ctrl + Enter to run
STDOUT

Sandboxed: no network, time- and memory-limited, output capped.

Get started

Three steps to a running program.

  1. 1

    Install

    curl -fsSL https://eskiu-lang.org/install.sh | sh

    Or brew install eskiu-lang/eskiu/eskiu, or a release archive for Windows.

  2. 2

    Write hello.esk

    import <io>;
    
    println("Hello, Eskiu!");

    A file with statements at the top level runs as a script; larger programs have a main.

  3. 3

    Run it

    $ eskiuc run hello.esk
    Hello, Eskiu!

    eskiuc hello.esk -o hello builds a native executable instead.

Read the Book of Eskiu Quickstart

Free and online, from Hello, Eskiu to async and bare metal. Code that compiles with 0.12.0 keeps compiling in every 0.12.x (stability policy).

Labs

How far down it goes.

Experiments with what comes next, and with unusual hardware. Not products, and not all of them serious.

A note from the developer

A note from the developer

I learned to program with Ruby, but the more I built, the more I found C underneath everything, Ruby and Python included. I came to love its simplicity. Rust and Zig are well made, but for my work they always felt more complicated than they needed to be.

So I wrote the language I wanted: the simplicity of C, with the conveniences I kept reaching for in other languages. Today it builds itself and runs in production at ReactVision. If you build something with it, I would like to hear about it.

Eduardo Dorantes

Eduardo DorantesCreator of Eskiu

The Eskiu mascot, drawn Tiny, a grey tabby cat, with its paws on a table
The mascot

Meet Tiny.

The kitten on every page is drawn from Tiny, the real one: paws on the table, watching what you type.