tsrpc/tsrpc
tsrpc/tsrpc has 1,937 GitHub stars and 200 forks. GitHot measured -2 stars in 24 hours. Last checked 2026-11-08 00:13 UTC. Last push 2026-02-26.
A TypeScript RPC framework, with runtime type checking and serialization, support both HTTP and WebSocket. It is very suitable for website / APP / games, and absolutely comfortable to full-stack TypeScript developers.
What you can do
- Runtime type checking
- Binary serialization
- Pure TypeScript, without any decorater or other language
- HTTP / WebSocket / and more protocols...
Measured star growth
- in 24h
- -2
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalTSRPC
EN / 中文
A TypeScript RPC framework with runtime type checking and binary serialization.
Official site: https://tsrpc.cn (English version is on the way)
Features
- Runtime type checking
- Binary serialization
- Pure TypeScript, without any decorater or other language
- HTTP / WebSocket / and more protocols...
- Optional backward-compatibility to JSON
- High performance and reliable, verified by services over 100,000,000 users
Create Full-stack Project
npx create-tsrpc-app@latest
Usage
Define Protocol (Shared)
export interface ReqHello {
name: string;
}
export interface ResHello {
reply: string;
}
Implement API (Server)
import { ApiCall } from "tsrpc";
export async function ApiHello(call: ApiCall<ReqHello, ResHello>) {
call.succ({
reply: 'Hello, ' + call.req.name
});
}
Call API (Client)
let ret = await client.callApi('Hello', {
name: 'World'
});
Examples
https://github.com/k8w/tsrpc-examples
Serialization Algorithm
The best TypeScript serialization algorithm ever. Without any 3rd-party IDL language (like protobuf), it is fully based on TypeScript source file. Define the protocols directly by your code.
This is powered by TSBuffer, which is going to be open-source.
TypeScript has the best type system, with some unique advanced features like union type, intersection type, mapped type, etc.
TSBuffer may be the only serialization algorithm that support them all.
API Reference
See API Reference.
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,729 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,283 starsreact/react
The library for web and native user interfaces.
252,382 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,631 stars