Why Semola?
Stop piecing together half-baked solutions from npm. Stop wrestling with type definitions that lie to you. Semola gives you everything you need with confidence: type-safe APIs that work seamlessly out of the box.Bun-first
Engineered specifically for Bun’s performance. No Node.js baggage.
Zero dependencies
No 50 dependencies to audit. Everything you need in one cohesive toolkit.
Type-safe
From request validation to response serialization, TypeScript catches errors before they hit production.
Tree-shakeable
Import only what you need. Your bundle stays lean.
Features
Semola provides seven modular packages, each designed to solve a specific problem:| Module | Description | Import |
|---|---|---|
| API Framework | Type-safe REST API with OpenAPI & Bun-native routing | semola/api |
| Queue | Redis-backed job queue with timeouts & concurrency | semola/queue |
| PubSub | Type-safe Redis pub/sub for real-time messaging | semola/pubsub |
| Policy | Policy-based authorization with type-safe guards | semola/policy |
| i18n | Compile-time validated internationalization | semola/i18n |
| Cache | Redis cache wrapper with TTL & automatic serialization | semola/cache |
| Errors | Result-based error handling without try/catch | semola/errors |
Performance
Semola API is the fastest API framework for Bun:| Framework | Avg Req/Sec | Latency Avg (ms) | vs Semola |
|---|---|---|---|
| Semola | 40,050 | 1.88 | baseline |
| Elysia | 37,185 | 2.13 | 1.1x slower |
| Hono | 34,611 | 2.31 | 1.2x slower |
| Fastify | 26,330 | 3.70 | 1.5x slower |
| Express | 20,031 | 5.02 | 2x slower |
| NestJS | 16,118 | 6.21 | 2.5x slower |
Higher is better for req/sec, lower is better for latency.
What makes Semola different?
Schema validation freedom
Use Zod, Valibot, ArkType, or any Standard Schema library. Your choice.Documentation writes itself
Auto-generated OpenAPI specs from your code. No more stale docs.Error handling reimagined
No more try-catch spaghetti. Clean result tuples that compose beautifully:Next steps
Installation
Install Semola and get your environment ready
Quickstart
Build your first API in under 5 minutes