Skip to content

Commit

Permalink
pb-rust: migrate to stable 3.x release
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Leightcap <jack.leightcap@trailofbits.com>
  • Loading branch information
jleightcap committed Jul 18, 2023
1 parent b90580b commit b5a03e8
Show file tree
Hide file tree
Showing 9 changed files with 3,435 additions and 5,919 deletions.
165 changes: 150 additions & 15 deletions gen/pb-rust/codegen/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gen/pb-rust/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ readme = "../README.md"
license-file = "../LICENSE"

[dependencies]
protoc-rust = "2.28"
protobuf-codegen = "3.2.0"
glob = "0.3"
9 changes: 3 additions & 6 deletions gen/pb-rust/codegen/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use glob::glob;
extern crate protoc_rust;
extern crate protobuf_codegen;

fn main() {
protoc_rust::Codegen::new()
protobuf_codegen::Codegen::new()
.includes([
concat!(env!("CARGO_MANIFEST_DIR"), "/../../../protos"),
"/opt/include",
Expand All @@ -16,10 +16,7 @@ fn main() {
.flatten(),
)
.out_dir("../src")
.customize(protoc_rust::Customize {
gen_mod_rs: Some(true),
..Default::default()
})
.customize(protobuf_codegen::Customize::default())
.run()
.expect("Running protoc failed.");
}
Loading

0 comments on commit b5a03e8

Please sign in to comment.