ktm v0.28.3

A compiled systems language for servers and tools.

Native code, coroutines for networking, a standard library with HTTP, JSON, TLS and cryptography, and no garbage collector.

Faster than Go at networking, with less memory and less CPU
HTTP server, 64 keep-alive connections, 2 coresktmGo 1.27 net/http
Requests per second327,612126,2022.6x
Requests per CPU second164,00870,1872.3x
Memory (peak RSS)3.3 MB13.0 MB4x less
Install on Linux x86_64 (other platforms)
curl -LO https://github.com/ozzenerol/ktm-lang/releases/download/v0.28.3/ktm-v0.28.3-linux-x86_64.zip
unzip ktm-v0.28.3-linux-x86_64.zip && cd ktm-v0.28.3-linux-x86_64 && sudo ./install.sh
hello.ktm
import net.http;

void hello(http.Writer *w, http.Request *r) {
    u8[] name = r.query("name");
    if !name.len { name = "world"; }
    w.text(200, "hello, %s\n", name);
}

i32 main() {
    http.Mux mux;
    mux.handle("GET /", &hello);
    return http.listen(8080, &mux);
}
$ ktm hello.ktm -o hello && ./hello &
$ curl 'localhost:8080/?name=ada'
hello, ada