Tin GitHub
Tin

Tin.
A language forged for servers.

Compiled, self-hosted, no garbage collector. One thread per core, faults you cannot ignore, request memory the compiler proves never leaks. Written to be written by machines, read by people.

Sn element 50Linux arm64 · amd64no GC, no pausesthread per coreself-hosted compilerkqueue / epoll server
package main

import "anvil"
import "argo"

type Message struct {
	text str max 200
}

fn hello(q anvil.Req, w mut anvil.Out) ! {
	let reply = try within 200ms {
		try greet(q.PathParam("name"))
	}
	w.Json()
	argo.Put(mut w.Body, Message{text: reply})
}

fn main() ! {
	let r = anvil.NewRouter()
	r.Get(`/hello/{name}`, hello)
	try r.Serve(":8080")
}
tin replay · capsules

Production replay

Every 5xx is recorded with the answers it got from Redis, the clock and the upstreams. Run it again on your laptop, against the fix, with none of them running. Then keep it as a test.

let · mut · units

Literals and bindings

Numbers, 200ms and 64kb, interpolated strings, names that stay and names that change.

struct · enum · ?T

Types

Sized numbers, immutable strings, reference containers, enums read by match, nothing nil by accident.

fn · mut · [T]

Functions

Read-only parameters, call-site mut, methods, closures, monomorphized generics.

for · match

Control flow

One loop with four shapes; match over values, ranges, enums and faults.

!T · try · catch

Errors

Faults are values that must be handled. wrap keeps the cause, guard turns a panic into one.

keep · arena

Memory

Request pools wiped per response; keep copies what must live on; the compiler checks it.

within · scope · select

Concurrency

Tasks inside boundaries; deadlines, budgets and cancellation flow down, never up.

with · use · on

Policies and lifecycle

Retry and trace as library policies; resources bound to scopes; typed lifecycle events.

anvil · argo

A service end to end

Router, per-core database, deadline, JSON: the constructs together in forty lines.