• Stars
    star
    6,975
  • Rank 5,453 (Top 0.2 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple RPC framework with protobuf service definitions

Twirp Logo Build Status Go Report Card GoDoc


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

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
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.