RustySecrets icon indicating copy to clipboard operation
RustySecrets copied to clipboard

Remove auto-generated schemata

Open dingxiangfei2009 opened this issue 7 years ago • 3 comments

  • Build schemata with protoc_rust in build.rs

Related to #67.

protoc_rust is added as a build dependency. It is used to trans-compile .proto schemata into Rust source. build.rs will put the trans-compiled schemata in place.

I am not fully certain on the decision between leaving out Cargo.lock and checking it in, but I slightly prefer leaving it out as per the suggestion from rust-lang.

Sorry. I am new to Travis. I will push a new change to make this build on Travis.

dingxiangfei2009 avatar May 17 '18 10:05 dingxiangfei2009

Does this require that protoc is installed on the build machine and available in $PATH or does this package bring protoc (or a Rust rewrite) in? If the former, do we want to add this build dependency, and how do we ensure that the whole crate can still be built reproducibly (i.e., maybe we should lock in the protoc version)?

psivesely avatar May 17 '18 21:05 psivesely

Yes, does. I have taken the idea from here to build the protoc on Travis-CI. In this pull request, I cache the protoc result to speed up future builds. The protoc used is locked to 3.5.1 for now.

dingxiangfei2009 avatar May 21 '18 06:05 dingxiangfei2009

The protoc used is locked to 3.5.1 for now.

This is referring to in Travis builds and a PR in the merkle.rs repo https://github.com/SpinResearch/merkle.rs/pull/38.

Would it be possible to ensure in build.rs that if the protoc binary found by protoc_rust is other than 3.5.1 the build fails with an informative error?

psivesely avatar May 22 '18 23:05 psivesely