Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: 对比近两年新出的 tRPC 项目 #34

Closed
myesn opened this issue Sep 25, 2022 · 1 comment
Closed

Question: 对比近两年新出的 tRPC 项目 #34

myesn opened this issue Sep 25, 2022 · 1 comment

Comments

@myesn
Copy link

myesn commented Sep 25, 2022

我看到现在有一个 https://github.com/trpc/trpc 项目,和您开发的 TSRPC 目标一致,不知道您这个项目的优势在哪里呢?

@myesn myesn changed the title 对比近两年新出的 tRPC 项目 Question: 对比近两年新出的 tRPC 项目 Sep 25, 2022
@k8w
Copy link
Owner

k8w commented Sep 25, 2022

实现思路不同

  • trpc 是单独实现了一套基于 Object 的协议定义标准
  • TSRPC 则是完全基于 TypeScript 类型定义协议

目前仅 TSRPC 拥有的核心特性

  1. 运行时类型检测(trpc 也仅仅是在编译时刻进行类型检测)
  2. 直接将 TypeScript 类型二进制序列化,大幅节省包体
  3. 跨传输协议支持,一套实现,同时支持 HTTP、WebSocket 、WebRTC 协议
  4. 支持直接传输 二进制、Date、ObjectId 等 JSON 原生无法支持的类型
  5. 客户端支持(含国内的小程序平台)

@myesn myesn closed this as completed Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants