tower-rs / tower-grpc

A gRPC client & server implementation.
MIT License
562 stars 73 forks source link

Show usage of cargo:rerun-if-changed in examples #189

Closed mzabaluev closed 5 years ago

mzabaluev commented 5 years ago

As the examples are going to be cribbed by application developers, it's important to demonstrate how rebuilds using tower-grpc-build can be reduced by printing cargo:rerun-if-changed instructions for cargo to only rerun the build script if the .proto files change.

nevi-me commented 5 years ago

Hi @mzabaluev, how does this work if one's building multiple proto files in the same build instance? Something like build(&["proto/one.proto", "proto/two.proto"], &["proto"])

mzabaluev commented 5 years ago

@nevi-me Each file needs its own line, as per the Cargo book.