File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed
Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,6 @@ tracing-subscriber = "0.3"
1717turmoil = { path = " ../.." }
1818
1919[build-dependencies ]
20- tonic-build = " 0.12"
20+ tonic-build = " 0.12.3 "
2121protox = " 0.7"
2222prost = " 0.13"
Original file line number Diff line number Diff line change 1- use prost:: Message ;
2- use std:: path:: PathBuf ;
3-
41fn 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}
You can’t perform that action at this time.
0 commit comments