Skip to content

Commit

Permalink
chore(types): Expose FILE_DESCRIPTOR_SET
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed Dec 21, 2022
1 parent c18811e commit 0b56364
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Binary file added tonic-types/src/generated/types.bin
Binary file not shown.
3 changes: 3 additions & 0 deletions tonic-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions tonic-types/tests/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 0b56364

Please sign in to comment.