resetprop: replace nanopb with quick-protobuf for persist

This commit is contained in:
LoveSy
2023-06-23 20:37:06 +08:00
committed by John Wu
parent 7826d7527f
commit 8d81bd0e33
17 changed files with 330 additions and 305 deletions
+19
View File
@@ -1,8 +1,27 @@
use pb_rs::{types::FileDescriptor, ConfigBuilder};
use crate::gen::gen_cxx_binding;
#[path = "../include/gen.rs"]
mod gen;
fn main() {
println!("cargo:rerun-if-changed=resetprop/proto/persistent_properties.proto");
gen_cxx_binding("core-rs");
let cb = ConfigBuilder::new(
&["resetprop/proto/persistent_properties.proto"],
None,
Some(&"resetprop/proto"),
&["."],
)
.unwrap();
FileDescriptor::run(
&cb.single_module(true)
.dont_use_cow(true)
.generate_getters(true)
.build(),
)
.unwrap();
}