Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets https://rules-proto-grpc.com/en/4.5.0
Go to file
Adam Liddell bc21b70be1 Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
.bazelci Add test workspace for special characters 2022-11-30 22:07:44 +00:00
.github Remove ci.yml experiment 2022-04-18 22:39:41 +01:00
android Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
buf Update buf to v1.7.0 and swap flags based on #210 2022-08-24 16:50:01 +01:00
c Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
cpp Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
csharp Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
d Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
doc Remove dangling file that is unused 2022-11-22 22:15:47 +00:00
docs Add changelog 2022-12-01 22:16:58 +00:00
example Set cxxopt 2022-11-22 22:13:59 +00:00
fsharp Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
go Apply buildifier 2022-12-01 22:13:20 +00:00
grpc-gateway Apply buildifier 2022-12-01 22:13:20 +00:00
internal Apply buildifier 2022-12-01 22:13:20 +00:00
java Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
js Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
objc Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
php Drop transitive aspect-based compilation. Closes #137 2021-09-17 18:25:48 +00:00
protobuf Revert using pre-compiled protoc 2021-09-18 21:21:03 +00:00
python Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
ruby Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
rust Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
scala Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
swift Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
test_workspaces Apply buildifier 2022-11-30 22:10:06 +00:00
third_party Replace Rust grpcio with grpc crate 2021-09-18 19:24:25 +00:00
tools Fix typo in dict comprehension 2022-12-01 22:35:25 +00:00
.bazelignore
.gitignore
.readthedocs.yaml Add RTD config file 2021-04-05 19:56:45 +00:00
BUILD.bazel
LICENSE
Makefile Update grpclib and use internal pip-compile from rules_python 2022-11-22 21:57:55 +00:00
README.md Add readme note 2022-08-24 17:11:53 +01:00
WORKSPACE Migrate from pip_install to pip_parse 2022-11-22 22:05:10 +00:00
defs.bzl Rename var 2022-12-01 21:53:45 +00:00
repositories.bzl Update rules_rust to 0.14.0 2022-12-01 21:47:21 +00:00

README.md

Protobuf and gRPC rules for Bazel

Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets

Announcements 📣

2022/08/24 - Version 4.2.0

Version 4.2.0 has been released, which contains a number of bug-fixes and dependency updates

Usage

Full documentation for the current and previous versions can be found here

Rules

Language Rule Description
Android android_proto_compile Generates an Android protobuf .jar file (example)
Android android_grpc_compile Generates Android protobuf and gRPC .jar files (example)
Android android_proto_library Generates an Android protobuf library using android_library from rules_android (example)
Android android_grpc_library Generates Android protobuf and gRPC library using android_library from rules_android (example)
Buf buf_proto_breaking_test Checks .proto files for breaking changes (example)
Buf buf_proto_lint_test Lints .proto files (example)
C c_proto_compile Generates C protobuf .h & .c files (example)
C c_proto_library Generates a C protobuf library using cc_library, with dependencies linked (example)
C++ cpp_proto_compile Generates C++ protobuf .h & .cc files (example)
C++ cpp_grpc_compile Generates C++ protobuf and gRPC .h & .cc files (example)
C++ cpp_proto_library Generates a C++ protobuf library using cc_library, with dependencies linked (example)
C++ cpp_grpc_library Generates a C++ protobuf and gRPC library using cc_library, with dependencies linked (example)
C# csharp_proto_compile Generates C# protobuf .cs files (example)
C# csharp_grpc_compile Generates C# protobuf and gRPC .cs files (example)
C# csharp_proto_library Generates a C# protobuf library using csharp_library from rules_dotnet. Note that the library name must end in .dll (example)
C# csharp_grpc_library Generates a C# protobuf and gRPC library using csharp_library from rules_dotnet. Note that the library name must end in .dll (example)
D d_proto_compile Generates D protobuf .d files (example)
D d_proto_library Generates a D protobuf library using d_library from rules_d (example)
Documentation doc_docbook_compile Generates DocBook .xml documentation file (example)
Documentation doc_html_compile Generates .html documentation file (example)
Documentation doc_json_compile Generates .json documentation file (example)
Documentation doc_markdown_compile Generates Markdown .md documentation file (example)
Documentation doc_template_compile Generates documentation file using Go template file (example)
F# fsharp_proto_compile Generates F# protobuf .fs files (example)
F# fsharp_grpc_compile Generates F# protobuf and gRPC .fs files (example)
F# fsharp_proto_library Generates a F# protobuf library using fsharp_library from rules_dotnet. Note that the library name must end in .dll (example)
F# fsharp_grpc_library Generates a F# protobuf and gRPC library using fsharp_library from rules_dotnet. Note that the library name must end in .dll (example)
Go go_proto_compile Generates Go protobuf .go files (example)
Go go_grpc_compile Generates Go protobuf and gRPC .go files (example)
Go go_validate_compile Generates Go protobuf and gRPC validation .go files (example)
Go go_proto_library Generates a Go protobuf library using go_library from rules_go (example)
Go go_grpc_library Generates a Go protobuf and gRPC library using go_library from rules_go (example)
Go go_validate_library Generates a Go protobuf and gRPC validation library using go_library from rules_go (example)
grpc-gateway gateway_grpc_compile Generates grpc-gateway .go files (example)
grpc-gateway gateway_openapiv2_compile Generates grpc-gateway OpenAPI v2 .json files (example)
grpc-gateway gateway_grpc_library Generates grpc-gateway library files (example)
Java java_proto_compile Generates a Java protobuf srcjar file (example)
Java java_grpc_compile Generates a Java protobuf and gRPC srcjar file (example)
Java java_proto_library Generates a Java protobuf library using java_library (example)
Java java_grpc_library Generates a Java protobuf and gRPC library using java_library (example)
JavaScript js_proto_compile Generates JavaScript protobuf .js and .d.ts files (example)
JavaScript js_grpc_node_compile Generates JavaScript protobuf and gRPC-node .js and .d.ts files (example)
JavaScript js_grpc_web_compile Generates JavaScript protobuf and gRPC-Web .js and .d.ts files (example)
JavaScript js_proto_library Generates a JavaScript protobuf library using js_library from rules_nodejs (example)
JavaScript js_grpc_node_library Generates a Node.js protobuf + gRPC-node library using js_library from rules_nodejs (example)
JavaScript js_grpc_web_library Generates a JavaScript protobuf + gRPC-Web library using js_library from rules_nodejs (example)
Objective-C objc_proto_compile Generates Objective-C protobuf .m & .h files (example)
Objective-C objc_grpc_compile Generates Objective-C protobuf and gRPC .m & .h files (example)
Objective-C objc_proto_library Generates an Objective-C protobuf library using objc_library (example)
Objective-C objc_grpc_library Generates an Objective-C protobuf and gRPC library using objc_library (example)
PHP php_proto_compile Generates PHP protobuf .php files (example)
PHP php_grpc_compile Generates PHP protobuf and gRPC .php files (example)
Python python_proto_compile Generates Python protobuf .py files (example)
Python python_grpc_compile Generates Python protobuf and gRPC .py files (example)
Python python_grpclib_compile Generates Python protobuf and grpclib .py files (supports Python 3 only) (example)
Python python_proto_library Generates a Python protobuf library using py_library from rules_python (example)
Python python_grpc_library Generates a Python protobuf and gRPC library using py_library from rules_python (example)
Python python_grpclib_library Generates a Python protobuf and grpclib library using py_library from rules_python (supports Python 3 only) (example)
Ruby ruby_proto_compile Generates Ruby protobuf .rb files (example)
Ruby ruby_grpc_compile Generates Ruby protobuf and gRPC .rb files (example)
Ruby ruby_proto_library Generates a Ruby protobuf library using ruby_library from rules_ruby (example)
Ruby ruby_grpc_library Generates a Ruby protobuf and gRPC library using ruby_library from rules_ruby (example)
Rust rust_proto_compile Generates Rust protobuf .rs files (example)
Rust rust_grpc_compile Generates Rust protobuf and gRPC .rs files (example)
Rust rust_proto_library Generates a Rust protobuf library using rust_library from rules_rust (example)
Rust rust_grpc_library Generates a Rust protobuf and gRPC library using rust_library from rules_rust (example)
Scala scala_proto_compile Generates a Scala protobuf .jar file (example)
Scala scala_grpc_compile Generates Scala protobuf and gRPC .jar file (example)
Scala scala_proto_library Generates a Scala protobuf library using scala_library from rules_scala (example)
Scala scala_grpc_library Generates a Scala protobuf and gRPC library using scala_library from rules_scala (example)
Swift swift_proto_compile Generates Swift protobuf .swift files (example)
Swift swift_grpc_compile Generates Swift protobuf and gRPC .swift files (example)
Swift swift_proto_library Generates a Swift protobuf library using swift_library from rules_swift (example)
Swift swift_grpc_library Generates a Swift protobuf and gRPC library using swift_library from rules_swift (example)

License

This project is derived from stackb/rules_proto under the Apache 2.0 license and this project therefore maintains the terms of that license