bazel rules_protobuf (java)

116 views
Skip to first unread message

Paul Johnston

unread,
Jul 31, 2016, 9:26:19 PM7/31/16
to grpc.io
I've been struggling to find a clean way to generate protobufs for java with gRPC support with bazel, so I just released rules_protobuf at https://github.com/pubref/rules_protobuf/tree/0.1.1.  

If you are new to http://bazel.io, this might be a good way to try it out.  As it will automatically install the protoc and protoc-gen-grpc-java binaries into your workspace, it requires no configuration and may be one of the easier ways to get started with gRPC.  

Looking forward to native protobuf support in bazel, but until then hopefully it fills a need for others with this requirement.  PRs definitely welcome for improvements or support for additional language output.

Cheers,
Paul

Eric Anderson

unread,
Aug 1, 2016, 7:42:43 PM8/1/16
to Paul Johnston, grpc.io
On Sun, Jul 31, 2016 at 6:26 PM, Paul Johnston <pcj...@gmail.com> wrote:
If you are new to http://bazel.io, this might be a good way to try it out.  As it will automatically install the protoc and protoc-gen-grpc-java binaries into your workspace, it requires no configuration and may be one of the easier ways to get started with gRPC.  

Very nice! Cute cat :)

Looking forward to native protobuf support in bazel, but until then hopefully it fills a need for others with this requirement.  PRs definitely welcome for improvements or support for additional language output.

I've been working with the Bazel team and have a (google-internal) Skylark rule for grpc-java that uses some of the native protobuf infrastructure they are building. I've not used Bazel yet (only Blaze), but when native protobuf support gets close (I don't know what timelines we're looking at) I may reach out to you to try things and get some feedback.

Paul Johnston

unread,
Aug 3, 2016, 2:43:42 PM8/3/16
to grpc.io
I've updated rules_protobuf to include support for cpp with grpc.  This is cool because it uses the grpc BUILD file, pulls in all the necessary tooling to build grpc++ with boringssl without the user having to install anything other than bazel.  Try it out and report issues!

$ bazel run examples/helloworld/cpp/server

Paul

Paul Grosu

unread,
Aug 3, 2016, 2:58:04 PM8/3/16
to grpc.io
Very cool!  If it gets any easier, somehow the image of the people from the movie Wall-E comes to mind :)  

$ bazel run ProgramCreatorBot
Reply all
Reply to author
Forward
0 new messages