Introduction
Welcome to Kito - The TypeScript web framework written in Rust
Kito is a high-performance, type-safe TypeScript web framework powered by a Rust core. It combines the developer experience of TypeScript with the blazing speed and safety of Rust.
Why Kito?
Blazing Fast
Built with Rust for unmatched performance. Handle thousands of requests per second with minimal overhead.
Type-Safe
Full TypeScript support with automatic type inference. Catch errors at compile time, not in production.
Developer Experience
Intuitive API inspired by Express and Fastify. Start building immediately with familiar patterns.
Rust-Powered Validation
Schema validation orders of magnitude faster than JavaScript alternatives. No performance penalty for safety.
Quick Example
import { server, schema, t } from "kitojs";
const app = server();
const userSchema = schema({
body: t.object({
name: t.str().min(1),
email: t.str().email()
})
});
app.post("/users", ({ req, res }) => {
const { name, email } = req.body;
res.json({ name, email });
}, userSchema);
app.listen(3000);Key Features
Extreme Performance
Kito consistently outperforms Node.js frameworks thanks to its Rust core:
Type-Safe by Default
Every request is validated and typed:
// TypeScript knows exact types
ctx.req.body.name; // string
ctx.req.body.email; // string
ctx.req.params.id; // string (if validated)Extensible
Extend the context with custom services:
const app = server()
.extend<{ db: Database }>(ctx => {
ctx.db = database;
});
app.get("/users", async ({ db, res }) => {
const users = await db.query("SELECT * FROM users");
res.json(users);
});Cross-Runtime
Works seamlessly on:
- Node.js (v18+)
- Deno (v1.30+)
- Bun (v1.0+)
Same code, same API, everywhere.
Next Steps
Community
License
Kito is MIT licensed.