Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

twirp

> 编程语言
Open source

A simple RPC framework with protobuf service definitions

7.5K stars0 likes0 views
WebsiteGitHub

About

A simple RPC framework with protobuf service definitions


Twirp is a framework for service-to-service communication emphasizing simplicity and minimalism. It generates routing and serialization from API definition files and lets you focus on your application's logic instead of thinking about folderol like HTTP methods and paths and JSON.

Twirp is similar to gRPC, but without the custom HTTP server and transport implementations: it runs on the standard library's extremely-well-tested-and-high-performance net/http Server. It can run on HTTP 1.1, not just http/2, and supports JSON serialization for easy debugging.

Along the way, you get autogenerated clients and a simple, smart framework for passing error messages. Nice!

Read more about the motivation behind on the announcement blog post.

Documentation

  • Getting Started
  • Usage Example
  • Errors
  • More: https://twitchtv.github.io/twirp/

Implementations in other languages

This repo contains the generator and runtime library for the Go implementation.

Here is a list of some third-party implementations in other languages.

Language Clients Servers Repository
Crystal ✓ ✓ github.com/mloughran/twirp.cr
Dart ✓ github.com/apptreesoftware/protoc-gen-twirp_dart
Elixir ✓ ✓ github.com/keathley/twirp-elixir
Java ✓ ✓ github.com/fajran/protoc-gen-twirp_java_jaxrs
Java ✓ github.com/devork/flit
Java ✓ github.com/github/flit
JavaScript ✓ github.com/thechriswalker/protoc-gen-twirp_js
JavaScript ✓ github.com/Xe/twirp-codegens/cmd/protoc-gen-twirp_jsbrowser
JavaScript ✓ ✓ github.com/tatethurston/TwirpScript
Kotlin ✓ github.com/collectiveidea/twirp-kmm
PHP ✓ ✓ github.com/twirphp/twirp
Python3 ✓ ✓ github.com/verloop/twirpy
Ruby ✓ ✓ github.com/twitchtv/twirp-ruby
Rust ✓ ✓ github.com/sourcefrog/prost-twirp
Scala ✓ ✓ github.com/soundcloud/twinagle
Swagger ✓ ✓ github.com/go-bridget/twirp-swagger-gen
Swift ✓ github.com/CrazyHulk/protoc-gen-swiftwirp
Typescript ✓ ✓ github.com/hopin-team/twirp-ts
Typescript ✓ ✓ github.com/tatethurston/TwirpScript
Typescript ✓ ✓ github.com/timostamm/protobuf-ts

Support and Community

We have a channel on the Gophers slack, #twirp, which is the best place to get quick answers to your questions. You can join the Gopher slack here.

Releases

Twirp follows semantic versioning through git tags, and uses GitHub Releases for release notes and upgrade guides: Twirp Releases

Contributing

Check out CONTRIBUTING.md for notes on making contributions.

License

This library is licensed under the Apache 2.0 License.

Issues· 15 open

View all issuesOpen on GitHub
  • #410

    邀请 twirp 加入 GithubStarMate,让更多人发现你的作品

    Updated Sep 30, 2026
  • #409

    docs: showcase contribution button points to the Docusaurus repository

    Updated Aug 27, 2026
  • #3

    Proposal: Support streaming in the Twirp spec

    feature requestproposalpendingUpdated Aug 2, 2026
  • #169

    Support Go Modules

    pendingUpdated Aug 2, 2026
  • #330

    Go package imported twice if proto package split into multiple files

    feature requestpendingUpdated Aug 2, 2026
  • #395

    twirp error unavailable: no response from servers

    Updated Aug 2, 2026
  • #398

    Twirp server emits 200 status code when it fails to write the response

    Updated Aug 2, 2026
  • #399

    Update documentation website - seems very out of date

    Updated Aug 2, 2026
  • #400

    Encoding batch requests via Twirp? 207 Multi-Status support in error spec?

    Updated Aug 2, 2026
  • #404

    How do you deprecate an rpc from a service?

    Updated Aug 2, 2026

> Tags

Gogoprotobufrpctwirp

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 2, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言