Skip to content

Commit 49a7038

Browse files
authored
Merge branch 'tokio-rs:main' into host_unreachable
2 parents 454be72 + c4c5414 commit 49a7038

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

examples/grpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ tracing-subscriber = "0.3"
1717
turmoil = { path = "../.." }
1818

1919
[build-dependencies]
20-
tonic-build = "0.12"
20+
tonic-build = "0.12.3"
2121
protox = "0.7"
2222
prost = "0.13"

examples/grpc/build.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
1-
use prost::Message;
2-
use std::path::PathBuf;
3-
41
fn main() -> std::io::Result<()> {
5-
let file_descriptors = protox::compile(["helloworld.proto"], ["."]).unwrap();
6-
let file_descriptor_path = PathBuf::from(std::env::var_os("OUT_DIR").expect("OUT_DIR not set"))
7-
.join("file_descriptor_set.bin");
8-
std::fs::write(&file_descriptor_path, file_descriptors.encode_to_vec()).unwrap();
9-
10-
tonic_build::configure()
11-
.file_descriptor_set_path(&file_descriptor_path)
12-
.skip_protoc_run()
13-
.compile_protos(&["helloworld.proto"], &["."])
14-
.unwrap();
15-
16-
Ok(())
2+
let fds = protox::compile(["helloworld.proto"], ["."]).unwrap();
3+
tonic_build::compile_fds(fds)
174
}

0 commit comments

Comments
 (0)