Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A small, low-level protocol buffer library

branch: master
upb - a small, low-level protocol buffer library


To build (the core library is ANSI C99 and has no dependencies):
$ make

Other useful targets:
$ make test
$ make benchmark
$ make lua (requires lua libraries to be installed)

The tests and benchmarks have the following dependencies
(Ubuntu package names in parentheses):
- Google's protobuf compiler + libraries (protobuf-compiler, libprotobuf-dev)
- Lua binary and libraries (lua5.1, liblua5.1-dev)

Issue tracking is on Google Code:

A manual is forthcoming, for now see wiki docs at:


The public C/C++ API is defined by all of the .h files in upb/ except .int.h
files (which are internal-only).

The .h files define both C and C++ APIs.  Both languages have 100% complete and
first-class APIs.  The C++ API is a wrapper around the C API, but all of the
wrapping is done in inline methods in .h files, so there is no overhead to this.

For a more detailed description of the scheme we use to provide both C and C++
APIs, see:

All of the code that is under upb/ but *not* under upb/bindings/ forms the
namespace of upb's cross-language public API.  For example, the code in
upb/descriptor would be exposed as follows:

  * in C/C++:
     #include "upb/descriptor/X.h"

  * in Lua:
     require "upb.descriptor"

  * in Python:
     import upb.descriptor

  * etc.


API and ABI are both subject to change!  Please do not distribute as a shared
library for this reason (for now at least).

Parsing is becoming stable, but serialization is in very early stages.

The Python bindings are completely broken and Lua only supports schemas for the


Author: Josh Haberman (,
See LICENSE for copyright information.
Something went wrong with that request. Please try again.