MCPcopy Index your code
hub / github.com/capnproto/go-capnp

github.com/capnproto/go-capnp @v2.18.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.18.2 ↗ · + Follow
4,807 symbols 13,737 edges 102 files 1,140 documented · 24% updated 8mo agov3.1.0-alpha.2 · 2025-10-25★ 1,40056 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Cap'n Proto bindings for Go

GoDoc Build Status

go-capnproto consists of: - a Go code generator for Cap'n Proto - a Go package that provides runtime support - a Go package that implements Level 1 of the RPC protocol

This project is looking for a new maintainer. See CONTRIBUTING.md.

Getting started

You will need the capnp tool to compile schemas into Go. This package has been tested with Cap'n Proto 0.5.0.

$ go get -u -t zombiezen.com/go/capnproto2/...
$ go test -v zombiezen.com/go/capnproto2/...

This library uses SemVer tags to indicate stable releases. While the goal is that master should always be passing all known tests, tagged releases are vetted more. When possible, use the latest release tag.

$ cd $GOPATH/src/zombiezen.com/go/capnproto2
$ git fetch
$ git checkout v2.16.0  # check the releases page for the latest

Then read the Getting Started guide.

API Compatibility

Consider this package's API as beta software, since the Cap'n Proto spec is not final. In the spirit of the Go 1 compatibility guarantee, I will make every effort to avoid making breaking API changes. The major cases where I reserve the right to make breaking changes are:

  • Security.
  • Changes in the Cap'n Proto specification.
  • Bugs.

The pogs package is relatively new and may change over time. However, its functionality has been well-tested and will probably only relax restrictions.

Documentation

See the docs on godoc.org.

What is Cap'n Proto?

The best cerealization...

https://capnproto.org/

License

MIT - see LICENSE file

Extension points exported contracts — how you extend this code

Client (Interface)
A Client represents an Cap'n Proto interface type. It is safe to use from multiple goroutines. Generally, only RPC pro [9 …
capability.go
Closer (Interface)
Closer is the interface that wraps the Close method. [13 implementers]
server/server.go
Echo_Server (Interface)
(no doc) [11 implementers]
internal/aircraftlib/aircraft.capnp.go
Pointer (Interface)
A value that implements Pointer is a reference to a Cap'n Proto object. Deprecated: Using this type introduces an unnec [3 …
pointer.go
Transport (Interface)
Transport is the interface that abstracts sending and receiving individual messages of the Cap'n Proto RPC protocol. [2 …
rpc/transport.go
Logger (Interface)
A Logger records diagnostic information and errors that are not associated with a call. The arguments passed into a log [2 …
rpc/log.go
CallOrder_Server (Interface)
(no doc) [3 implementers]
rpc/internal/testcapnp/test.capnp.go
Arena (Interface)
An Arena loads and allocates segments for a Message.
mem.go

Core symbols most depended-on inside this repo

Struct
called by 586
capability.go
Errorf
called by 570
rpc/log.go
ToPtr
called by 373
list.go
Ptr
called by 292
internal/aircraftlib/aircraft.capnp.go
IsValid
called by 286
list.go
Ptr
called by 231
struct.go
SetPtr
called by 214
internal/aircraftlib/aircraft.capnp.go
Segment
called by 211
pointer.go

Shape

Method 2,957
Function 1,060
Struct 647
TypeAlias 117
Interface 24
FuncType 2

Languages

Go100%

Modules by API surface

internal/aircraftlib/aircraft.capnp.go1,096 symbols
std/capnp/schema/schema.capnp.go654 symbols
internal/schema/schema.capnp.go621 symbols
std/capnp/rpc/rpc.capnp.go517 symbols
rpc/internal/testcapnp/test.capnp.go219 symbols
list.go102 symbols
std/capnp/rpctwoparty/rpc-twoparty.capnp.go100 symbols
internal/demo/hashes/hash.capnp.go100 symbols
std/capnp/persistent/persistent.capnp.go96 symbols
std/capnp/json/json.capnp.go79 symbols
capability.go66 symbols
mem.go65 symbols

For agents

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

⬇ download graph artifact