close

A small language
for work that is not.

For services, scheduled jobs and command-line tools. It starts in 2.8 ms, refuses to run a program with a mistake it can already see, and ecko build turns your code into one executable you copy to the server.

Write your first program
curl -fsSL ecko.sh/install | sh
Homebrew, Windows and checksums
A dithered black and white mountain range with five cave-painting animals standing along its foot: a stag, a bison, a mammoth, a horse and an aurochs.

Six programs

Read it before you install it.

Each example is a whole program, and the output beside it is what the shipped binary printed.

api.ecko

import std.http
import std.json

fn fee(cents: Int) = cents * 3 // 100

# One bad request gets a 500. The next one is served as normal.
http.serve(8080, fn(req) {
    cents = json.decode(req.body).cents
    http.json({ cents: cents, fee: fee(cents) })
})

terminal

$ ecko build api.ecko
Built api (29908 KB). Run it with ./api
$ ./api &
ecko http: listening on 0.0.0.0:8080 (8 workers)
$ curl --json '{"cents": 1250}' localhost:8080
{"cents":1250,"fee":37}
$ curl --json 'not json' localhost:8080
Internal Server Error
$ curl --json '{"cents": 900}' localhost:8080
{"cents":900,"fee":27}

01 Fast

Starts in 2.8 ms, every time.

A bytecode compiler and a stack VM, with no JIT that has to warm up. The thousandth run costs what the first one did, which is what a CLI, a cron job or a request handler actually pays.

  • No collector pauses

    Memory is freed when the last reference to it goes. Nothing stops the process to sweep, so hour four of a batch job runs like minute one.

  • Parallel in one call

    pmap runs one worker per item across your cores, each on its own snapshot. Sixteen 250 ms calls finish in 251 ms.

Cold start · hello world to first byte out
  • ecko

    2.8ms

  • python

    10.5ms

  • node

    20.9ms

  • ruby

    47.4ms

Median of 100 runs after 10 discarded. Ecko v0.80.0, python 3.12.3, node 24.4.0, ruby 3.2.3, on an AMD Ryzen 9 5950X under Linux, measured 2026-11-07. Against AOT-compiled languages the gap is smaller, but they want a build step before you have run a line.

02 Reliable

A mistake stops where it was made.

Not three steps later, with a wrong number already in the database. These are the real messages, from the shipped binary.

  • A typo never runs

    The whole file is checked before its first line executes. An undefined name, a wrong argument count or a value assigned and never read stops the program before it charges anyone.

    error[likely-typo]: 'totl' is assigned but never read, and 'total' is a `mut` in scope - did you mean `total = ...`?
    --> charge.ecko:4:5
    program not started
  • Overflow raises

    Integer arithmetic does not wrap around. On a balance column, the failure you want is the one that stops, not the one that carries on with a smaller number.

    Error: That addition overflowed - the result is too big for a 64-bit integer.
    --> ledger.ecko:3:15
      |
    3 | print(balance + deposit)
      |               ^
  • Missing data is an error

    Reading a key that is not there stops at that line, with the file and column, instead of passing an empty value down the pipeline.

    error: map has no key 'cents'
    --> settle.ecko:6:15
      |
    6 |     total += p.cents
      |               ^
  • One bad request is one 500

    A handler that fails answers that request with a 500 and logs where it failed. The server keeps serving the next one.

    ecko http: 500 internal error: handler failed (500): JSON parse error: expected ident at line 1 column 2 (kind parse, at api.ecko:8:17)

Every error is a value: try and catch handle the ones you expect, like the malformed row in example 03, and let the rest stop the job. Error handling

03 Deploy

Copy one file to the server.

ecko build compiles your program and its packages into a single executable. The server needs no Ecko, no interpreter, no virtualenv and no node_modules. Copy it over and run it.

  • Links the C library and nothing else
  • Runs with an empty environment
  • Packages vendored and pinned by sha256
Building an executable
$ ecko build api.ecko
Built api (29908 KB). Run it with ./api
$ ldd api | awk '{print $1}'
linux-vdso.so.1
libgcc_s.so.1
libm.so.6
libc.so.6
/lib64/ld-linux-x86-64.so.2
$ env -i ./api
ecko http: listening on 0.0.0.0:8080 (8 workers)

Written in Python first. Finished in Ecko.

A backfill out of a first-generation schema into its replacement. The Python version was abandoned mid-way. The Ecko rewrite went through the whole set without a single failure.

Read the case

Transaction records moved in production

1.3 billion

ecko lsp ships in the same binary: diagnostics, completion, hover and go-to-definition.

Try it on the next job that has to finish.

One binary, four platforms, nothing else to install. If it turns out not to be for you, it is one file to delete.

Read the docs
curl -fsSL ecko.sh/install | sh

Homebrew: brew install ecko-lang/tap/ecko · binaries and checksums