SpinResearch / RustySecrets

🔑 Threshold Shamir's secret sharing in Rust
BSD 3-Clause "New" or "Revised" License
254 stars 33 forks source link

Remove auto-generated schemata #69

Open dingxiangfei2009 opened 6 years ago

dingxiangfei2009 commented 6 years ago

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.

psivesely commented 6 years ago

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)?

dingxiangfei2009 commented 6 years ago

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.

psivesely commented 6 years ago

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?