pbtools icon indicating copy to clipboard operation
pbtools copied to clipboard

How does it compare with upb?

Open alexpacini opened this issue 5 years ago • 4 comments

Could you consider adding upb (https://github.com/protocolbuffers/upb) to your comparison?

I think upb is made by Joshua Haberman, who seems to be working for Google. The repo has 1.1k stars, it seems quite popular.

It is also based on arenas.

alexpacini avatar Jan 30 '20 23:01 alexpacini

I would love to add it to the comparison, but I can't figure out how to use it. The documentation mentions the build system Bazel, which I've never used. Could you help me out?

eerimoq avatar Jan 31 '20 08:01 eerimoq

Honestly I had the same issue. I never used Bazel before.

What I understood is:

  • these are likely to be the dependencies https://github.com/protocolbuffers/upb/blob/master/bazel/workspace_deps.bzl
  • they have a CMakeLists.txt but they say it is not complete
  • The make rules (well, in bazel language) are likely to be at https://github.com/protocolbuffers/upb/blob/master/BUILD
  • For using Bazel I think you need to create an empty bazel project for the test, add this upb as a module and then use bazel to compile the .proto to a c lib. It seems quite complicated. Maybe because the upb generator is in cpp and not python, so it needs to be compiled.

If you think that it is not worth to do the comparison, feel free to close the issue.

alexpacini avatar Jan 31 '20 08:01 alexpacini

I've no interest in learning Bazel myself atm, but let's leave the issue open. If we are lucky someone submits a PR adding upb to the comparison.

eerimoq avatar Jan 31 '20 08:01 eerimoq

Just a small addition: Here are the instructions on how to use upb: https://github.com/haberman/upb#using-upb-in-your-project

YugoCode avatar Jul 25 '23 23:07 YugoCode