1 minute read

Quick Answer

Elysia is a high-performance TypeScript framework designed explicitly for the Bun runtime. It achieves 262,000+ RPS through JIT compilation (Exact Mirror) and Bun’s native System Router. The Eden Treaty ecosystem enables end-to-end type safety between backend and frontend without code generation, making Elysia the optimal choice for performance-critical Bun applications.

What is Elysia?

Elysia prioritizes type safety and performance. Every aspect of the framework—from route definitions to request validation—is driven by TypeScript type inference, creating a “Single Source of Truth” for both runtime behavior and compile-time checking.

Version 1.4.20 Highlights

Key Features:

  • Exact Mirror (JIT normalization, 500x faster)
  • System Router (Bun native integration)
  • Reduced Type Instantiation
  • CVE-2025-66457 security patch

Release: January 2026

Maintainer: Elysia Team

Core Architecture

Fluent Interface

const app = new Elysia()
  .state({ db: new Database() })
  .get('/users', ({ db }) => db.getUsers())
  .post('/users', ({ body }) => db.createUser(body))
  .listen(3000);

Type Inference:

  • Context accumulation via chaining
  • Strict typing at every layer
  • IDE autocomplete for c.db, c.body

Elysia vs Fastify

Metric Elysia (Bun) Fastify (Node)
Throughput ~262K RPS ~60K RPS
Startup Instant Slower
Validation JIT (Exact Mirror) Schema-based

Best Use Cases

Ideal For:

  • Bun applications
  • Type-safe APIs
  • High-throughput services

Avoid For:

  • Legacy Node.js projects
  • Teams without TypeScript experience

Conclusion

Elysia is the definitive framework for Bun in 2026. Its combination of raw performance, type safety, and Eden Treaty type sharing makes it superior to Fastify or Express for any greenfield Bun project.


Last Updated: 2026-01-20

Updated: