build.rs 713 B

12345678910111213141516171819202122232425
  1. //! Builds libthreema (d'oh!).
  2. use std::io::Result;
  3. #[cfg(feature = "uniffi")]
  4. use uniffi as _;
  5. fn main() -> Result<()> {
  6. // Compile protobuf
  7. println!("cargo:rerun-if-changed=../threema-protocols/src/");
  8. prost_build::Config::new().enable_type_names().compile_protos(
  9. &[
  10. "../threema-protocols/src/common.proto",
  11. "../threema-protocols/src/csp-e2e.proto",
  12. "../threema-protocols/src/md-d2d.proto",
  13. "../threema-protocols/src/md-d2d-sync.proto",
  14. "../threema-protocols/src/md-d2d-rendezvous.proto",
  15. "../threema-protocols/src/md-d2m.proto",
  16. ],
  17. &["../threema-protocols/src/"],
  18. )?;
  19. // Done
  20. Ok(())
  21. }