-
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use tonic for rust proto and grpc. Updates to handle dependency chains.
- Loading branch information
1 parent
978b48d
commit 5e60e62
Showing
286 changed files
with
11,640 additions
and
16,225 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
load("@rules_proto_grpc//rust:defs.bzl", "rust_prost_proto_compile") | ||
|
||
rust_prost_proto_compile( | ||
name = "person_rust_proto", | ||
name = "person_prost", | ||
declared_proto_packages = ["example.proto"], | ||
options = { | ||
"//rust:rust_prost_plugin": ["type_attribute=.other.space.Person=#[derive(Eq\\,Hash)]"], | ||
}, | ||
protos = ["@rules_proto_grpc//example/proto:person_proto"], | ||
) | ||
|
||
rust_prost_proto_compile( | ||
name = "place_rust_proto", | ||
name = "place_prost", | ||
declared_proto_packages = ["example.proto"], | ||
options = { | ||
"//rust:rust_prost_plugin": ["type_attribute=.other.space.Place=#[derive(Eq\\,Hash)]"], | ||
}, | ||
protos = ["@rules_proto_grpc//example/proto:place_proto"], | ||
|
||
prost_proto_deps = [] | ||
) | ||
|
||
rust_prost_proto_compile( | ||
name = "thing_rust_proto", | ||
name = "thing_prost", | ||
declared_proto_packages = ["example.proto"], | ||
options = { | ||
# Known limitation, can't derive if the type contains a pbjson type. | ||
# "//rust:rust_prost_plugin": ["type_attribute=.other.space.Thing=#[derive(Eq\\,Hash)]"], | ||
}, | ||
protos = ["@rules_proto_grpc//example/proto:thing_proto"], | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,32 @@ | ||
load("@rules_proto_grpc//rust:defs.bzl", "rust_prost_proto_library") | ||
|
||
|
||
rust_prost_proto_library( | ||
name = "proto_rust_prost_proto", | ||
name = "personplace_prost", | ||
declared_proto_packages = ["example.proto"], | ||
protos = [ | ||
"@rules_proto_grpc//example/proto:person_proto", | ||
"@rules_proto_grpc//example/proto:place_proto", | ||
"@rules_proto_grpc//example/proto:thing_proto", | ||
], | ||
options = { | ||
"//rust:rust_prost_plugin": [ | ||
"type_attribute=.example.proto.Person=#[derive(Eq\\,Hash)]", | ||
"type_attribute=.example.proto.Place=#[derive(Eq\\,Hash)]", | ||
]}, | ||
prost_proto_deps = [ | ||
":thing_prost" | ||
] | ||
) | ||
|
||
rust_prost_proto_library( | ||
name = "thing_prost", | ||
declared_proto_packages = ["example.proto"], | ||
protos = [ | ||
"@rules_proto_grpc//example/proto:thing_proto", | ||
], | ||
options = { | ||
"//rust:rust_prost_plugin": [ | ||
# Intentionally Ommitted. | ||
# "type_attribute=.example.proto.Thing=#[derive(Eq\\,Hash)]", | ||
]} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
load("@rules_proto_grpc//rust:defs.bzl", "rust_tonic_grpc_compile") | ||
load("@rules_proto_grpc//rust:defs.bzl", "rust_tonic_grpc_compile", ) | ||
|
||
rust_tonic_grpc_compile( | ||
name = "thing_rust_grpc", | ||
protos = ["@rules_proto_grpc//example/proto:thing_proto"], | ||
) | ||
|
||
rust_tonic_grpc_compile( | ||
name = "greeter_rust_grpc", | ||
protos = ["@rules_proto_grpc//example/proto:greeter_grpc"], | ||
) | ||
name = "greeter_tonic", | ||
declared_proto_packages = ["example.proto"], | ||
protos = [ | ||
"@rules_proto_grpc//example/proto:greeter_grpc", | ||
"@rules_proto_grpc//example/proto:person_proto", | ||
"@rules_proto_grpc//example/proto:place_proto", | ||
"@rules_proto_grpc//example/proto:thing_proto", | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
load("@rules_proto_grpc//rust:defs.bzl", "rust_tonic_grpc_library") | ||
load("@rules_proto_grpc//rust:defs.bzl", "rust_tonic_grpc_library", "rust_prost_proto_library") | ||
|
||
|
||
rust_tonic_grpc_library( | ||
name = "greeter_rust_tonic_grpc", | ||
name = "greeter_tonic", | ||
declared_proto_packages = ["example.proto"], | ||
protos = [ | ||
"@rules_proto_grpc//example/proto:greeter_grpc", | ||
"@rules_proto_grpc//example/proto:person_proto", | ||
"@rules_proto_grpc//example/proto:place_proto", | ||
"@rules_proto_grpc//example/proto:thing_proto", | ||
], | ||
options = { | ||
"//rust:rust_prost_plugin": [ | ||
"type_attribute=.example.proto.Person=#[derive(Eq\\,Hash)]", | ||
"type_attribute=.example.proto.Place=#[derive(Eq\\,Hash)]", | ||
]}, | ||
) | ||
# rust_prost_proto_library( | ||
# name = "thing_prost", | ||
# declared_proto_packages = ["example.proto"], | ||
# protos = [ | ||
# "@rules_proto_grpc//example/proto:thing_proto", | ||
# ], | ||
# ) |
Oops, something went wrong.