🚀 Blazing Fast
Built on Bun's native HTTP server with a Trie-based router, ahead-of-time compilation, and zero-copy responses. Outperforms Express, Fastify, Hono, and Elysia.
Fast, type-safe, and simple. Built for Bun from the ground up.
import { Asi } from "asijs";
const app = new Asi();
app.get("/", () => "Hello, World!");
app.get("/user/:id", (ctx) => ({ id: ctx.params.id }));
app.group("/api", (api) => {
api.get("/users", () => [{ name: "Alice" }, { name: "Bob" }]);
api.post("/users", (ctx) => {
const body = await ctx.json();
return { created: body };
});
});
app.listen(3000);AsiJS is designed for maximum performance:
| Framework | Requests/sec | Latency |
|---|---|---|
| AsiJS (compiled) | ~185,000 | ~0.05ms |
| AsiJS | ~170,000 | ~0.06ms |
| Elysia | ~155,000 | ~0.07ms |
| Hono | ~140,000 | ~0.08ms |
| Fastify | ~95,000 | ~0.11ms |
| Express | ~25,000 | ~0.40ms |
Benchmarks performed on Bun 1.3 with simple JSON response. Your mileage may vary.