Skip to content

Commit c32e7b7

Browse files
authored
Merge pull request namada-net#4351 from anoma/tomas/fix-tonic-out-dir
tx: build tonic artifacts into OUT_DIR
2 parents 3558ccf + 6a057c2 commit c32e7b7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

crates/tx/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ fn main() {
1515
println!("cargo:rerun-if-changed={}", PROTO_SRC);
1616

1717
tonic_build::configure()
18-
.out_dir("src/proto/generated")
1918
.protoc_arg("--experimental_allow_proto3_optional")
2019
.compile_protos(&[format!("{}/types.proto", PROTO_SRC)], &[PROTO_SRC])
2120
.unwrap();

crates/tx/src/proto/generated.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
#![allow(missing_docs)]
22

3-
pub mod types;
3+
/// Tonic tx types generated from protobuf definitions at build
4+
pub mod types {
5+
include!(concat!(env!("OUT_DIR"), "/types.rs"));
6+
}

0 commit comments

Comments
 (0)