| commit | 6522ae4fb3f567f3385a9d5ad7f67b015aeb22ac | [log] [tgz] |
|---|---|---|
| author | Sakala Venkata Krishna Rohit <rohitsakala@gmail.com> | Mon Aug 27 16:16:09 2018 +0530 |
| committer | Sakala Venkata Krishna Rohit <rohitsakala@gmail.com> | Mon Aug 27 16:16:09 2018 +0530 |
| tree | 72306b30039fda5b52c8167f2c0609e1c5d12477 | |
| parent | 38d674e86f4d5b368e37e20d31a44c2924de6998 [diff] |
Bugfix on bigendianess by casting size_t to unint32_t The reason for typecasting size_t to unint32_t is that size_t is 8 bytes and uint32_t is only 4 bytes. If not typecasted Memcpy fails to copy the *correct* four bytes in big endian platforms.
μ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).
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
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 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
Author: Josh Haberman (jhaberman@gmail.com, haberman@google.com)