The fastest end-to-end type-safe RPC framework for TypeScript — compiled pipelines, single package, every runtime
End-to-end type-safe RPC framework for TypeScript. Single package — server, client, 15 plugins, 14 adapters. Full docs at silgi.dev.
pnpm add silgi
# or: npm install silgi / yarn add silgi / bun add silgi
Requires Node.js >=24.
import { silgi } from 'silgi'
const k = silgi({
context: (req) => ({ now: Date.now() }),
})
const hello = k.$resolve(({ ctx }) => ({ message: 'hi', at: ctx.now }))
const router = k.router({ hello })
export default k.handler(router)
Export handler from any Fetch-compatible runtime (Next.js App Router,
SvelteKit, Remix, Astro, SolidStart, Hono, srvx, Bun, Deno, Cloudflare
Workers, AWS Lambda via the hono adapter, …). Dedicated adapters for
Express, Nitro, NestJS, and Node’s raw http live under
silgi/express, silgi/nextjs, silgi/sveltekit, etc.
Run a standalone server:
await k.serve(router, { port: 3000 })
CONTRIBUTING.md — dev setup, commands, PR checklist.ARCHITECTURE.md — request pipeline, module layout, performance invariants.SECURITY.md — threat model, reporting policy, security features.docs/rfcs/0001-de-magic.md — theMIT
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.