Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
640 B
20 lines
640 B
2 years ago
|
"""Support for rust_proto_library_aspect unit-tests."""
|
||
|
|
||
|
load("//rust:defs.bzl", "RustProtoInfo", "rust_proto_library_aspect")
|
||
|
|
||
|
ActionsInfo = provider(
|
||
|
doc = ("A provider that exposes what actions were registered by rust_proto_library_aspect " +
|
||
|
"on proto_libraries."),
|
||
|
fields = {"actions": "List[Action]: actions registered on proto_libraries."},
|
||
|
)
|
||
|
|
||
|
def _attach_aspect_impl(ctx):
|
||
|
return [ctx.attr.dep[RustProtoInfo], ActionsInfo(actions = ctx.attr.dep.actions)]
|
||
|
|
||
|
attach_aspect = rule(
|
||
|
implementation = _attach_aspect_impl,
|
||
|
attrs = {
|
||
|
"dep": attr.label(aspects = [rust_proto_library_aspect]),
|
||
|
},
|
||
|
)
|