Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
This branch is 178 commits ahead, 20 commits behind jmckaskill:master.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Version 1.0 vs 2.0

Update 2015 Sept 20:

Big news! Version 2.0 of the go-bindings, authored by Ross Light, is now released and newly available! It features capnproto RPC and capabilities support. See for the v2 code and docs.

This repository ( is now being called version 1.0 of the go bindings for capnproto. It does not have RPC (it was created before the RPC protocol was defined). Version 1 has schema generating tools such as Personally I have many projects that use v1 with mangos for network transport; Here is an example of using them together: Nonetheless, for new projects, especially once v2 has been hardened and tested, v2 should be preferred.

Version 1 will be maintained for applications that currently use it. However new users, new features and new code contributions should be directed to the version 2 code base to take advantage of the RPC and capabilities.


MIT - see LICENSE file


In godoc see


5 April 2014: James McKaskill, the author of go-capnproto (, has been super busy of late, so I agreed to take over as maintainer. This branch ( includes my recent work to fix bugs in the creation (originating) of structs for Go, and an implementation of the packing/unpacking capnp specification. Thanks to Albert Strasheim ( of CloudFlare for a great set of packing tests. - Jason

Getting started

New! Visit the sibling project to this one, bambam, to automagically generate a capnproto schema from the struct definitions in your go source files. Bambam makes it easy to get starting with go-capnproto.

pre-requisite: Due to the use of the customtype annotation feature, you will need a relatively recent capnproto installation. At or after 1 July 2014 (at or after b2d752beac5436bada2712f1a23185b78063e6fa) is known to work.

# first: be sure you have your GOPATH env variable setup.
$ go get -u -t
$ cd $GOPATH/src/
$ make # will install capnpc-go and compile the test schema aircraftlib/aircraft.capnp, which is used in the tests.
$ diff ./capnpc-go/capnpc-go `which capnpc-go` # you should verify that you are using the capnpc-go binary you just built. There should be no diff. Adjust your PATH if necessary to include the binary capnpc-go that you just built/installed from ./capnpc-go/capnpc-go.
$ go test -v  # confirm all tests are green

What is Cap'n Proto?

The best cerealization...


Cap'n Proto library and parser for go. This is go-capnproto-1.0, and does not have rpc. See for 2.0 which has rpc and capabilities.







No releases published


No packages published


  • Go 94.9%
  • Cap'n Proto 4.8%
  • Other 0.3%