
Convenience that doesn’t
cost you control.
Kestrel is a memory-safe, compiled language with simple defaults you can rewire.
func findUser(id: Int64) -> Optional[User] { let user: User = match users.lookup(id).tryExtract() { .Continue(v) => v, .Break(r) => return .fromResidual(r) }; if user.age.compare(18) == .Less { return Optional.None }; user } func greet(id: Int64) -> String { let user = findUser(id).coalesce({ User(name: "guest", age: 0) }); var s = DefaultStringInterpolation(literalCapacity: 8, interpolationCount: 1); s.appendLiteral("Hello, "); s.appendInterpolation(user.name); s.appendLiteral("!"); s.build() } @main func main() { var it = ["Alice", "Bob", "Carol"].iter(); loop { match it.next() { .Some(name) => println(name), .None => break } } }
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) } }
This looks like any modern language. Clean syntax, readable defaults, nothing unusual.
But none of it is special-cased.
Every shortcut is a protocol you can see, touch, and extend.
T?→try→<→null→??→\(...)→for...in→[...]→This looks like any modern language. Clean syntax, readable defaults. But none of it is special-cased.
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) } }
The standard library uses these protocols to implement Optional, Result, Array, and String. Conform your own types and they get the same syntax — because it’s the same machinery.
for...inImplement next() and your type works in any for loop
tryImplement tryExtract() and your type works with try
??Implement coalesce() and your type works with ??
\(...)Implement format() and your type works in string interpolation
a < bImplement compare() and your type works with <, <=, >, >=
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);
Kestrel is in preview — expect sharp edges and fast iteration.
any Protocol values with dynamic dispatch
@derive(Equatable, Hashable, Cloneable)
Optional chaining, pipe operator, placeholder args
Reference types with ref counting and weak references
Lazy sequences that pause and resume with yield
Async functions, executors, futures, async iteration
Task groups, cancellation, and data-race safety
given / using for allocators, loggers, and config
Compile-time reflection and code generation
async, throws, yield unified into one composable model
Shaped by real-world usage and community feedback
any Protocol values with dynamic dispatch
@derive(Equatable, Hashable, Cloneable)
Optional chaining, pipe operator, placeholder args
Reference types with ref counting and weak references
Lazy sequences that pause and resume with yield
Async functions, executors, futures, async iteration
Task groups, cancellation, and data-race safety
given / using for allocators, loggers, and config
Compile-time reflection and code generation
async, throws, yield unified into one composable model
Shaped by real-world usage and community feedback
Not just a compiler. The package manager, registry, language server, editor extension, and agent plugins are built and released as one toolchain — one install gets all of it.
Dependencies, builds, publishing — and a registry to share it all.
JessupInstall, pin, and update compiler versions with one command.
Language serverHover, completion, go-to-definition — the same incremental engine the compiler uses.
VS Code extensionSyntax highlighting and full LSP integration out of the box.
Claude & Codex pluginsAn agent that already knows the language, plus docs shipped for LLMs.
Install the toolchain and run your first Kestrel program
$ curl -fsSL https://kestrel-lang.com/install | shInstalls Jessup (the Kestrel version manager), the latest preview toolchain, the VS Code extension, and the Claude Code / Codex plugin. Installs the toolchain, VS Code extension, and AI plugin. View the script.