MCPcopy
hub / github.com/twitchtv/twirp

github.com/twitchtv/twirp @v8.1.3 sqlite

repository ↗ · DeepWiki ↗ · release v8.1.3 ↗
4,630 symbols 14,590 edges 281 files 2,100 documented · 45%
README

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
Python3 github.com/verloop/twirpy
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
Typescript github.com/hopin-team/twirp-ts
Typescript github.com/larrymyers/protoc-gen-twirp_typescript
Typescript github.com/tatethurston/TwirpScript
Typescript github.com/timostamm/protobuf-ts
Ruby github.com/twitchtv/twirp-ruby
Rust github.com/cretz/prost-twirp
Scala github.com/soundcloud/twinagle
Swagger github.com/go-bridget/twirp-swagger-gen
PHP github.com/twirphp/twirp
Dart github.com/apptreesoftware/protoc-gen-twirp_dart
Elixir github.com/keathley/twirp-elixir
Swift github.com/CrazyHulk/protoc-gen-swiftwirp
Crystal github.com/mloughran/twirp.cr

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.

Extension points exported contracts — how you extend this code

Error (Interface)
Error represents an error in a Twirp service call. [17 implementers]
errors.go
TwirpServer (Interface)
TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for ac [16 …
example/service.twirp.go
TwirpServer (Interface)
TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for ac [16 …
internal/twirptest/service.twirp.go
DescribableMessage (Interface)
A DescribableMessage provides a gzipped, protobuf-encoded FileDescriptorProto, and a series of ints which index into the [59 …
internal/descriptors/descriptors.go
ProtoMessage (Interface)
ProtoMessage is the top-level interface that all proto messages implement. This is declared in the protoreflect package [53 …
_tools/src/google.golang.org/protobuf/reflect/protoreflect/proto.go
TwirpServer (Interface)
TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for ac [16 …
clientcompat/internal/clientcompat/clientcompat.twirp.go
Interceptor (FuncType)
Interceptor is a form of middleware for Twirp requests, that can be installed on both clients and servers. To intercept
interceptors.go
ClientOption (FuncType)
ClientOption is a functional option for extending a Twirp client.
client_options.go

Core symbols most depended-on inside this repo

P
called by 959
protoc-gen-twirp/generator.go
P
called by 920
_tools/src/google.golang.org/protobuf/compiler/protogen/protogen.go
Kind
called by 296
_tools/src/google.golang.org/protobuf/reflect/protoreflect/type.go
FullName
called by 289
_tools/src/google.golang.org/protobuf/reflect/protoreflect/type.go
Errorf
called by 264
errors.go
Elem
called by 257
_tools/src/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
Get
called by 241
_tools/src/google.golang.org/protobuf/reflect/protoreflect/value.go
Set
called by 226
_tools/src/google.golang.org/protobuf/reflect/protoreflect/value.go

Shape

Method 2,395
Function 1,625
Struct 393
Interface 113
TypeAlias 80
FuncType 14
Class 10

Languages

Go100%
TypeScript1%

Modules by API surface

_tools/src/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go339 symbols
_tools/src/google.golang.org/protobuf/internal/impl/codec_gen.go328 symbols
_tools/src/google.golang.org/protobuf/internal/filedesc/desc.go163 symbols
_tools/src/google.golang.org/protobuf/reflect/protoreflect/type.go146 symbols
_tools/src/google.golang.org/protobuf/internal/impl/convert.go91 symbols
clientcompat/internal/clientcompat/clientcompat.twirp.go77 symbols
internal/twirptest/snake_case_names/snake_case_names.twirp.go69 symbols
internal/twirptest/service_method_same_name/service_method_same_name.twirp.go69 symbols
internal/twirptest/service.twirp.go69 symbols
internal/twirptest/no_package_name_importer/no_package_name_importer.twirp.go69 symbols
internal/twirptest/no_package_name/no_package_name.twirp.go69 symbols
internal/twirptest/multiple/multiple1.twirp.go69 symbols

Dependencies from manifests, versioned

docusaurus1.0.5 · 1×

For agents

$ claude mcp add twirp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact