Kestrel

Convenience that doesn’t
cost you control.

Kestrel is a memory-safe, compiled language with simple defaults you can rewire.

scroll to explore

Sugar not magic

This looks like any modern language. Clean syntax, readable defaults. But none of it is special-cased.

sugar
func findUser(id: Int64) -> User? {
    let user: User = try users.lookup(id);
    if user.age < 18 { return null };
    user
}

func greet(id: Int64) -> String {
    let user = findUser(id) ?? User(name: "guest", age: 0);
    "Hello, \(user.name)!"
}

@main
func main() {
    for name in ["Alice", "Bob", "Carol"] {
        println(name)
    }
}

Same machinery with your types

for...in
Iterator
try
Tryable
??
Coalesce
\(...)
Formattable
a < b
Comparable

What you can build today

server.ksBuild HTTP servers with Perch
import perch.app.(App)
import perch.request.(Request)
import perch.response.(Response)
import perch.middleware.(Logger)
import http.content.(Text, JsonBody)

struct Ctx: Cloneable {
    func clone() -> Ctx { Ctx() }
}

var app = App(Ctx());
app.use(Logger[Ctx]());

app.route(get: "/hello/:name", { (req: Request, ctx: Ctx) in
    let name = req.param("name") ?? "world";
    Response.ok(Text("Hello, \(name)!"))
});

app.listen(8080);
output

The roadmap

Kestrel is in preview — expect sharp edges and fast iteration.

Preview 2

Types & expressiveness

Existential types

any Protocol values with dynamic dispatch

Attributes & derives

@derive(Equatable, Hashable, Cloneable)

Expression sugar

Optional chaining, pipe operator, placeholder args

Class runtime

Reference types with ref counting and weak references

Preview 3

Concurrency

Generators & yield

Lazy sequences that pause and resume with yield

Async / await

Async functions, executors, futures, async iteration

Structured concurrency

Task groups, cancellation, and data-race safety

Future

Where it's all going

Implicit context

given / using for allocators, loggers, and config

Procedural macros

Compile-time reflection and code generation

Algebraic effects

async, throws, yield unified into one composable model

And more

Shaped by real-world usage and community feedback

Take flight

$ curl -fsSL https://kestrel-lang.com/install | sh

Installs the toolchain, VS Code extension, and AI plugin. View the script.