LoopPerfect / buckaroo-wishlist

Meta repo for Buckaroo package requests ✨
https://buckaroo.pm
MIT License
9 stars 0 forks source link

google/protobuf #66

Closed r0x0d closed 7 years ago

r0x0d commented 7 years ago

google/protobuf

Please, can you take a look at it? Thanks.

EDIT: I need protobuf for Linux and Windows, but if you can only make it for linux its totally fine.

njlr commented 7 years ago

Hi @nicht taking a look now. I will ensure that the port works for Linux, but Windows may take some time. The Buck team are still working on the VC++ integration with Buck.

njlr commented 7 years ago

Hi @nicht, protobuf has just been added to the official cookbook.

To get started:

buckaroo update
buckaroo install google/protobuf

The version ported is v3.3.0 in OPENSOURCE_PROTOBUF_CPP_BOOTSTRAP mode. Basically this means that C++ generation will work, but for other languages you might have to resort to your system protoc. If this is a problem, let me know and I'll try to figure something out!

The recipe has been tested on macOS and Debian 9.

Usage

protobuf is a bit unusual because it consists of a library (protobuf) and a compiler (protoc). Both are included in the Buckaroo package. You can use one, the other or both. I would recommend using both, since this guarantees that the versions will match.

To use protobuf the library, just add it to your Buck target's deps.

Using protoc is a bit more complicated. Basically you need to run protoc in a Buck genrule and gather the results into a library. There is an example here: https://github.com/njlr/buckaroo-test-google-protobuf/blob/master/BUCK

If you get stuck, please let me know and I can guide you through the process.

r0x0d commented 7 years ago

Cool. Thank you so much <3