We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0ad48c3 + c8bcaa8 commit e67dc5fCopy full SHA for e67dc5f
README.md
@@ -36,9 +36,16 @@ Add a `build.rs` file to your project to compile the protos and generate Rust co
36
37
```rust
38
fn main() {
39
+ let proto_source_files = ["./service.proto"];
40
+
41
+ // Tell Cargo to rerun this build script if any of the proto files change
42
+ for entry in &proto_source_files {
43
+ println!("cargo:rerun-if-changed={}", entry);
44
+ }
45
46
prost_build::Config::new()
47
.service_generator(twirp_build::service_generator())
- .compile_protos(&["./service.proto"], &["./"])
48
+ .compile_protos(&proto_source_files, &["./"])
49
.expect("error compiling protos");
50
}
51
```
0 commit comments