Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
bazel/ | 25-Apr-2025 | - | 1,634 | 1,418 | ||
benchmarks/ | 25-Apr-2025 | - | 2,940 | 2,421 | ||
cmake/ | 25-Apr-2025 | - | 8,087 | 7,512 | ||
docs/ | 25-Apr-2025 | - | 817 | 649 | ||
lua/ | 25-Apr-2025 | - | 3,939 | 2,695 | ||
protos/ | 25-Apr-2025 | - | 1,176 | 863 | ||
protos_generator/ | 25-Apr-2025 | - | 3,973 | 3,018 | ||
python/ | 25-Apr-2025 | - | 10,098 | 6,980 | ||
third_party/lunit/ | 25-Apr-2025 | - | 926 | 636 | ||
upb/ | 25-Apr-2025 | - | 43,203 | 29,657 | ||
upbc/ | 25-Apr-2025 | - | 5,369 | 4,042 | ||
BUILD | D | 25-Apr-2025 | 29.6 KiB | 1,220 | 1,140 | |
CONTRIBUTING.md | D | 25-Apr-2025 | 1.3 KiB | 38 | 26 | |
DESIGN.md | D | 25-Apr-2025 | 8.2 KiB | 202 | 165 | |
LICENSE | D | 25-Apr-2025 | 1.4 KiB | 27 | 22 | |
README.md | D | 25-Apr-2025 | 2.3 KiB | 85 | 59 | |
WORKSPACE | D | 25-Apr-2025 | 2.6 KiB | 87 | 68 |
README.md
1 2# μpb: small, fast C protos 3 4μpb (often written 'upb') is a small 5[protobuf](https://github.com/protocolbuffers/protobuf) implementation written 6in C. 7 8upb is the core runtime for protobuf languages extensions in 9[Ruby](https://github.com/protocolbuffers/protobuf/tree/master/ruby), 10[PHP](https://github.com/protocolbuffers/protobuf/tree/master/php), and 11[Python](https://github.com/protocolbuffers/upb/tree/main/python). 12 13While upb offers a C API, the C API & ABI **are not stable**. For this reason, 14upb is not generally offered as a C library for direct consumption, and there 15are no releases. 16 17## Features 18 19upb has comparable speed to protobuf C++, but is an order of magnitude smaller 20in code size. 21 22Like the main protobuf implementation in C++, it supports: 23 24- a generated API (in C) 25- reflection 26- binary & JSON wire formats 27- text format serialization 28- all standard features of protobufs (oneofs, maps, unknown fields, extensions, 29 etc.) 30- full conformance with the protobuf conformance tests 31 32upb also supports some features that C++ does not: 33 34- **optional reflection:** generated messages are agnostic to whether 35 reflection will be linked in or not. 36- **no global state:** no pre-main registration or other global state. 37- **fast reflection-based parsing:** messages loaded at runtime parse 38 just as fast as compiled-in messages. 39 40However there are a few features it does not support: 41 42- text format parsing 43- deep descriptor verification: upb's descriptor validation is not as exhaustive 44 as `protoc`. 45 46## Install 47 48For Ruby, use [RubyGems](https://rubygems.org/gems/google-protobuf): 49 50``` 51$ gem install google-protobuf 52``` 53 54For PHP, use [PECL](https://pecl.php.net/package/protobuf): 55 56``` 57$ sudo pecl install protobuf 58``` 59 60For Python, use [PyPI](https://pypi.org/project/protobuf/): 61 62``` 63$ sudo pip install protobuf 64``` 65 66Alternatively, you can build and install upb using 67[vcpkg](https://github.com/microsoft/vcpkg/) dependency manager: 68 69 git clone https://github.com/Microsoft/vcpkg.git 70 cd vcpkg 71 ./bootstrap-vcpkg.sh 72 ./vcpkg integrate install 73 ./vcpkg install upb 74 75The upb port in vcpkg is kept up to date by microsoft team members and community 76contributors. 77 78If the version is out of date, please 79[create an issue or pull request](https://github.com/Microsoft/vcpkg) on the 80vcpkg repository. 81 82## Contributing 83 84Please see [CONTRIBUTING.md](CONTRIBUTING.md). 85