@@ -4,31 +4,33 @@ use std::io::Write;
44#[ derive( Serialize , Debug ) ]
55pub struct Metadata {
66 pub id : String ,
7- pub version : String ,
7+ pub xtask_version : String ,
8+ pub header_version : String ,
89 pub header_file_path : String ,
910 pub output_file_path : String ,
1011 pub bindgen : BindgenMetadata ,
1112}
1213
1314impl Metadata {
14- pub fn new < Id , Ver , Header , Output , Target > (
15+ pub fn new < Id , HVer , Header , Output , Target > (
1516 id : Id ,
16- version : Ver ,
17+ header_version : HVer ,
1718 header_file_path : Header ,
1819 output_file_path : Output ,
1920 custom_llvm_target : Option < Target > ,
2021 ) -> Self
2122 where
2223 Id : Into < String > ,
23- Ver : Into < String > ,
24+ HVer : Into < String > ,
2425 Header : Into < String > ,
2526 Output : Into < String > ,
2627 Target : Into < String > ,
2728 {
2829 let custom_llvm_target = custom_llvm_target. map ( |t| t. into ( ) ) ;
2930 Self {
3031 id : id. into ( ) ,
31- version : version. into ( ) ,
32+ xtask_version : env ! ( "CARGO_PKG_VERSION" ) . into ( ) ,
33+ header_version : header_version. into ( ) ,
3234 header_file_path : header_file_path. into ( ) ,
3335 output_file_path : output_file_path. into ( ) ,
3436 bindgen : BindgenMetadata :: new ( custom_llvm_target) ,
0 commit comments