feat(types): Expose FILE_DESCRIPTOR_SET (#1210)

This commit is contained in:
tottoto
2022-12-23 04:05:22 +09:00
committed by GitHub
parent fdff11115b
commit cc42d1f88c
4 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -20,4 +20,4 @@ prost-types = "0.11"
tonic = {version = "0.8", path = "../tonic"}
[dev-dependencies]
tonic-build = {version = "0.8", path = "../tonic-build", features = ["prost"]}
tonic-build = {version = "0.8", path = "../tonic-build", features = ["prost", "cleanup-markdown"]}
Binary file not shown.
+3
View File
@@ -24,6 +24,9 @@
/// Useful protobuf types
pub mod pb {
include!("generated/google.rpc.rs");
/// Byte encoded FILE_DESCRIPTOR_SET.
pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("generated/types.bin");
}
pub use pb::Status;
+1
View File
@@ -11,6 +11,7 @@ fn bootstrap() {
tonic_build::configure()
.out_dir(format!("{}", out_dir.display()))
.file_descriptor_set_path(out_dir.join("types.bin"))
.compile(iface_files, dirs)
.unwrap();