Protocol Buffers - Google's data interchange format (grpc依赖) https://developers.google.com/protocol-buffers/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Joshua Haberman 06b90f9b69 Split upb_proto_library.bzl into its own .bzl file. 6 years ago
generated_for_cmake Fixed amalgamation and CMake build. 6 years ago
kokoro/ubuntu Query CMake version. 6 years ago
tests More Blaze fixes. 6 years ago
third_party/lunit Removed the JIT. Nobody was actually using it, and table-driven should achieve 80-90% of the perf. 6 years ago
tools Works with Bazel 0.24.1 and Bazel 0.25.2! 6 years ago
upb More Blaze fixes. 6 years ago
upbc Fixed oneof case accessor to cast to enum for C++. 6 years ago
.gitignore Implement json decoding for Any message. (#130) 6 years ago
.gitmodules A good start on upb_encode and upb_decode. 8 years ago
BUILD Split upb_proto_library.bzl into its own .bzl file. 6 years ago
CMakeLists.txt Updated protobuf to the main branch again. 6 years ago
CONTRIBUTING.md Brought into compliance with Google open-source policies. 10 years ago
DESIGN.md First version of a real C codegen for upb. 8 years ago
LICENSE Update copyright to be Google Inc. 14 years ago
README.md Removed a bunch of obsolete code. 6 years ago
WORKSPACE Updated protobuf to the main branch again. 6 years ago
build_defs.bzl Split upb_proto_library.bzl into its own .bzl file. 6 years ago
lua.BUILD WIP. 6 years ago
ragel.BUILD Fixed conflict error with Ragel on Bazel 0.25. 6 years ago
repository_defs.bzl A (final?) round of Blaze fixes. 6 years ago
upb_proto_library.bzl Split upb_proto_library.bzl into its own .bzl file. 6 years ago

README.md

μpb - a small protobuf implementation in C

Build Status Coverage Status

μpb is a small protobuf implementation written in C.

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

Building the core libraries

The core libraries are pure C99 and have no dependencies.

$ make

This will create a separate C library for each core library in lib/. They are built separately to help your binaries slim, so you don't need to link in things you neither want or need.

Other useful targets:

$ make tests
$ make test

C and C++ API

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

Lua bindings

Lua bindings provide μpb's functionality to Lua programs. The bindings target Lua 5.1, Lua 5.2, LuaJIT, and (soon) Lua 5.3.

To build the Lua bindings, the Lua libraries must be installed. Once they are installed, run:

$ make lua

Note that if the Lua headers are not in a standard place, you may need to pass custom flags:

$ make lua USER_CPPFLAGS=`pkg-config lua5.2 --cflags`

To test the Lua bindings:

$ make testlua

Contact

Author: Josh Haberman (jhaberman@gmail.com, haberman@google.com)