Skip to content

Commit

Permalink
Add protobuf_src for protoc dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantomShift committed Feb 13, 2024
1 parent b3ab74a commit fd5d64f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
19 changes: 19 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ zip = { version = "0.6.6", features = ["deflate-zlib"] }

[build-dependencies]
prost-build = "0.12.1"
protobuf-src = "1.1.0"
4 changes: 3 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
extern crate prost_build;

extern crate protobuf_src;

fn main() {
std::env::set_var("PROTOC", protobuf_src::protoc());

if let Err(e) = prost_build::compile_protos(&["src/neko.proto"],&["src/"]) {
println!("cargo:warning=Error occured when compiling neko.proto; did you generate it with proto_gen?");
println!("cargo:warning={}", e.to_string());
Expand Down

0 comments on commit fd5d64f

Please sign in to comment.