Skip to content

AOT-compiled, LLVM-backed programming language

AOT-compiled, LLVM-backed programming language

Build anythingwithout the boilerplate

As easy as Python, as fast as C. A statically-typed, AOT-compiled language with HTTP, JSON, SQLite, an ORM, OpenAPI, and C FFI built right into the runtime — no npm install, no pip, no dependencies.

~36kreq/s · Tulpar pool
C-classinteger kernels · AOT
0external dependencies
api.tpr
import "wings";
import "orm";

orm_open("app.db");
define_model("users", {
  "name": "TEXT", "age": "INTEGER"
});

func list_users(req) {
  return ok(orm_all("users"));
}

get("/users", "list_users");
serve(8080);  // + Swagger UI, /openapi.json
$ tulpar build api.tpr running
counter.tpr
// Count lines in all .tpr files
var total = 0;
var files = list_dir(".");

for (str f in files) {
  if (endsWith(f, ".tpr")) {
      str content = read_file(f);
      var lines = split(content, "\n");
      int n = length(lines);
      print(f + ": " + toString(n));
      total = total + n;
  }
}

print("Total: " + toString(total));
$ tulpar build counter.tpr running
stats.tpr
// Compute stats from a dataset
func mean(array data) {
  float sum = 0.0;
  for (var x in data) {
      sum = sum + toFloat(x);
  }
  return sum / toFloat(length(data));
}

var scores = [85, 92, 78, 96, 88, 73, 91];
float avg = mean(scores);
print("Average: " + toString(avg));
print("Max:     " + toString(max(scores)));
print("Min:     " + toString(min(scores)));
$ tulpar build stats.tpr running
Under the hood

One command, one native binary

tulpar build runs the whole pipeline ahead of time. What you ship is a standalone native executable — no VM, no interpreter.

  1. api.tpr

    Source

    English or Turkish keywords — same compiler.

  2. lexer → parser

    Parse

    Source becomes an AST. Syntax errors stop here, in your locale.

  3. LLVM 18 IR

    Codegen

    The AST is lowered to LLVM IR.

  4. clang + runtime

    Link

    Linked with the Tulpar runtime: HTTP, JSON, SQLite and more.

  5. ./api

    Native binary

    A standalone executable. No VM, no interpreter.

Benchmarks

Fast where it counts

Throughput on GET / → JSON {“hello”:“world”}, keep-alive, native load tester, one 14-vCPU box. Each runtime in its recommended single-process config.

Tulparpool · 14c
~36k req/s
Go net/http14c
~30k req/s
Node.js http1c
~8.7k req/s
FastAPIuvicorn · 1w
~3.5k req/s

And latency stays low: p50 0.32 ms (Tulpar) vs 3.3 ms (FastAPI). On CPU, Tulpar beats C on fib (2.7× vs gcc -O3 -march=native -flto) and ties it on sieve and intloop; C takes arrayiter and strcat at equal flags and tooling. Full table, flag matrix and withdrawn claims

Why Tulpar?

All-in-one vs. assembly required

What takes four packages elsewhere ships in a single binary with Tulpar.

TulparLangGoPython (FastAPI)Node.js
HTTP server Built-in Built-in pip install Minimal
ORM / database Built-in go get gorm pip install npm install
OpenAPI / Swagger Auto-generated External tool Plugin npm install
Deployment Single binary Single binary Container needed Container needed
Memory model Arena (no GC) GC (stop-the-world) GC + refcount GC (V8)
Throughput ~36k req/s ~30k req/s ~3.5k req/s ~8.7k req/s
C interop (FFI) Native cgo ctypes / cffi node-ffi
Features

Everything you need is already in the box

An API on day one

import “wings”, register a route, serve(8080) — done. All of this comes with it:

  • OpenAPI 3.0
  • Swagger UI
  • Schema validation → 422
  • Dependency injection
  • Structured logging
  • Keep-alive
  • /healthz
  • /metrics · JSON + Prometheus

C-class performance

AOT-compiled via LLVM 18 to a standalone native binary. No VM overhead in production.

SQLite + ORM

Embedded SQLite and an Active-Record ORM — no driver to wire up.

No GC pauses

No garbage collector, so no stop-the-world pauses. Memory comes from arenas; exactly how much is reclaimed on which path is being measured — see the memory notes.

C FFI

Call any C library directly. Native interop with zero wrapper overhead.

Editor tooling

Bundled LSP, tulpar fmt, and a VS Code extension.

Package manager

tulpar pkg with a tulpar.toml manifest and lockfile.

UTF-8, Turkish + English

Full Turkish keyword support (fonk, eğer, döndür) and bilingual compiler diagnostics.

Write code in your language

English and Turkish — same compiler, same binary

Every keyword has a Turkish equivalent. Mix freely, or write entirely in one language. Compiler diagnostics follow your locale. Hover a keyword to see its twin.

EN greet.tpr English syntax
import "wings";

func greet(req) {
  var name = req.json["name"];
  if (name == "") { return bad_request("Name required"); }
  return ok("Hello, " + name + "!");
}

post("/greet", "greet");
serve(8080);
TR selamla.tpr Türkçe sözdizimi
içe_aktar "wings";

fonk selamla(req) {
  değişken isim = req.json["name"];
  eğer (isim == "") { döndür bad_request("İsim gerekli"); }
  döndür ok("Merhaba, " + isim + "!");
}

post("/selamla", "selamla");
serve(8080);
Live playground

Try it right here in your browser

No install, no setup. Edit the code and hit Run — it executes in the page.

hello.tpr — recursion + the ternary operator
From zero to a REST API

A persistent CRUD service in one file

Model, routes and server in a single .tpr — boots with /healthz, /metrics, /openapi.json and a Swagger UI for free.

import "wings";
import "orm";
orm_open("app.db");
define_model("users", {
"id": "INTEGER PRIMARY KEY AUTOINCREMENT",
"name": "TEXT NOT NULL",
"age": "INTEGER"
});
func list_users(req) { return ok(orm_all("users")); }
func create_user(req) {
int id = orm_create("users", req.json);
return created(orm_find("users", id));
}
get("/users", "list_users");
post("/users", "create_user");
body_schema({"name": "str", "age?": "int"}); // invalid body → 422, automatically
serve(8080);
Routes after serve(8080)
  • GET/userslist_users
  • POST/usersvalidated, 422 on bad body
  • GET/healthzbuilt-in
  • GET/metricsJSON + Prometheus
  • GET/openapi.jsongenerated
  • UISwagger UIgenerated

Want the guided version? The Wings tutorial builds three complete apps step by step — REST, token auth, and a SQLite-backed API.

Ready in one command

Install the toolchain, then compile and run your first program. macOS, Linux, and Windows.

$curl -fsSL https://tulparlang.dev/install.sh | bash