fn main() { println!("cargo:rerun-if-changed=src/build.rs"); println!("cargo:rerun-if-changed=Cargo.lock"); println!("cargo:rerun-if-changed=protocol/api/api.proto"); tonic_build::configure() .enum_attribute("EntryType", "#[derive(serde::Serialize, serde::Deserialize)]") .type_attribute("Param", "#[derive(serde::Serialize, serde::Deserialize)]") .type_attribute("Entry", "#[derive(serde::Serialize, serde::Deserialize)]") .type_attribute("ABI", "#[derive(serde::Serialize, serde::Deserialize)]") .type_attribute("SmartContract", "#[derive(serde::Serialize, serde::Deserialize)]") .compile( &[ "protocol/api/api.proto", "protocol/core/contract/vote_asset_contract.proto", // this is missing by api ], &["protocol/"], ) .unwrap(); }