Begin XML Schema Validator
This commit is contained in:
15
lib/xml_schema_validator/build.rs
Normal file
15
lib/xml_schema_validator/build.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
pub fn main() {
|
||||
println!("cargo:rerun-if-changed=../../action_schema.xsd");
|
||||
let output = std::process::Command::new("xml_schema_generator.exe")
|
||||
.arg("--derive")
|
||||
.arg("Clone, Debug, Deserialize, Serialize")
|
||||
.arg("../../action_schema.xsd")
|
||||
.arg("src/schema.rs")
|
||||
.output()
|
||||
.expect("Failed to execute xml_schema_generator");
|
||||
|
||||
if !output.status.success() {
|
||||
panic!("xml_schema_generator failed: {}",
|
||||
String::from_utf8_lossy(&output.stderr));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user