Skip to main content
Semola (pronounced “seh-MOH-lah”) is a batteries-included TypeScript toolkit built specifically for Bun. It provides everything you need to build production-ready applications: type-safe APIs, background job queues, real-time messaging, caching, authorization, and error handling.

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:
ModuleDescriptionImport
API FrameworkType-safe REST API with OpenAPI & Bun-native routingsemola/api
QueueRedis-backed job queue with timeouts & concurrencysemola/queue
PubSubType-safe Redis pub/sub for real-time messagingsemola/pubsub
PolicyPolicy-based authorization with type-safe guardssemola/policy
i18nCompile-time validated internationalizationsemola/i18n
CacheRedis cache wrapper with TTL & automatic serializationsemola/cache
ErrorsResult-based error handling without try/catchsemola/errors

Performance

Semola API is the fastest API framework for Bun:
FrameworkAvg Req/SecLatency Avg (ms)vs Semola
Semola40,0501.88baseline
Elysia37,1852.131.1x slower
Hono34,6112.311.2x slower
Fastify26,3303.701.5x slower
Express20,0315.022x slower
NestJS16,1186.212.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:
const [error, data] = await mightThrow(fetch("https://api.example.com"));

if (error) {
  console.error("Request failed:", error);
  return;
}

console.log("Success:", data);

Next steps

Installation

Install Semola and get your environment ready

Quickstart

Build your first API in under 5 minutes

Build docs developers (and LLMs) love