Skip to content

Commit

Permalink
Merge branch with cleanup of deprecated code.
Browse files Browse the repository at this point in the history
  • Loading branch information
panhania committed Oct 20, 2023
2 parents 64180f8 + 2424597 commit 75ce268
Show file tree
Hide file tree
Showing 33 changed files with 293 additions and 4,601 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "proto/grr"]
path = vendor/grr
url = https://github.com/google/grr
[submodule "proto/vendor/protobuf"]
path = vendor/protobuf
url = https://github.com/protocolbuffers/protobuf
35 changes: 3 additions & 32 deletions crates/rrg-proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@
use std::path::PathBuf;

const PROTOS: &'static [&'static str] = &[
"../../vendor/grr/grr/proto/grr_response_proto/semantic.proto",
"../../vendor/grr/grr/proto/grr_response_proto/sysinfo.proto",
"../../vendor/grr/grr/proto/grr_response_proto/knowledge_base.proto",
"../../vendor/grr/grr/proto/grr_response_proto/jobs.proto",
"../../vendor/grr/grr/proto/grr_response_proto/timeline.proto",
"../../vendor/grr/grr/proto/grr_response_proto/anomaly.proto",
"../../vendor/grr/grr/proto/grr_response_proto/export.proto",
"../../vendor/grr/grr/proto/grr_response_proto/objects.proto",
"../../vendor/grr/grr/proto/grr_response_proto/output_plugin.proto",
"../../vendor/grr/grr/proto/grr_response_proto/flows.proto",
"../../vendor/grr/grr/proto/grr_response_proto/user.proto",
];

const PROTOS_V2: &'static [&'static str] = &[
"../../proto/rrg.proto",
"../../proto/rrg/blob.proto",
"../../proto/rrg/fs.proto",
Expand All @@ -40,33 +26,18 @@ fn main() {
.expect("no output directory")
.into();


let proto_out_dir = outdir.join("proto");
std::fs::create_dir_all(&proto_out_dir).unwrap();

protobuf_codegen_pure::Codegen::new()
.out_dir(&proto_out_dir)
.include("../../vendor/grr/grr/proto")
.include("../../vendor/protobuf/src")
.inputs(PROTOS)
.customize(protobuf_codegen_pure::Customize {
gen_mod_rs: Some(true),
..Default::default()
})
.run().unwrap();

for proto in PROTOS_V2 {
for proto in PROTOS {
println!("cargo:rerun-if-changed={}", proto);
}

let proto_out_dir = outdir.join("proto-v2");
let proto_out_dir = outdir.join("proto");
std::fs::create_dir_all(&proto_out_dir).unwrap();

protobuf_codegen_pure::Codegen::new()
.out_dir(&proto_out_dir)
.include("../../vendor/protobuf/src")
.include("../../proto")
.inputs(PROTOS_V2)
.inputs(PROTOS)
.customize(protobuf_codegen_pure::Customize {
gen_mod_rs: Some(true),
..Default::default()
Expand Down
Loading

0 comments on commit 75ce268

Please sign in to comment.