| commit | 00765002ff5889f8235b08a0b4d5c4ea5c9990c9 | [log] [tgz] |
|---|---|---|
| author | Eric Salo <salo@google.com> | Wed Sep 14 20:27:24 2022 -0700 |
| committer | Copybara-Service <copybara-worker@google.com> | Wed Sep 14 20:27:58 2022 -0700 |
| tree | c914c51af7ef670181c68168c1725d7ab4b342c8 | |
| parent | cbba1fb1e1aae278bc9b913063412a56b2711cf7 [diff] |
- All of reflection now lives in upb/reflection/ - Each def type has its own .c file and its own .h file - Functions that require a builder context are declared in def_builder.h - The mini descriptor encoders have also been pulled into upb/reflection/ - upb/def.h, upb/def.hpp, upb/reflection.h, and upb/reflection.hpp are now deprecated stubs that point to the new headers PiperOrigin-RevId: 474459500
μpb (often written ‘upb’) is a small protobuf implementation written in C.
upb is the core runtime for protobuf languages extensions in Ruby, PHP, and (soon) Python.
While upb offers a C API, the C API & ABI are not stable. For this reason, upb is not generally offered as a C library for direct consumption, and there are no releases.
upb has comparable speed to protobuf C++, but is an order of magnitude smaller in code size.
Like the main protobuf implementation in C++, it supports:
upb also supports some features that C++ does not:
However there are a few features it does not support:
protoc.For Ruby, use RubyGems:
$ gem install google-protobuf
For PHP, use PECL:
$ sudo pecl install protobuf
Alternatively, you can build and install upb using vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git cd vcpkg ./bootstrap-vcpkg.sh ./vcpkg integrate install ./vcpkg install upb
The upb port in vcpkg is kept up to date by microsoft team members and community contributors.
If the version is out of date, please create an issue or pull request on the vcpkg repository.
Please see CONTRIBUTING.md.