Skip to content

Commit 40e7828

Browse files
committed
use protobuf-src crate to vendor protoc C dependency
1 parent 9b47cde commit 40e7828

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

candle-onnx/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ prost = "0.12.1"
1616

1717
[build-dependencies]
1818
prost-build = "0.12.1"
19+
protobuf-src = "2.1.1"
1920

2021
[dev-dependencies]
2122
anyhow = { version = "1", features = ["backtrace"] }

candle-onnx/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::io::Result;
22

33
fn main() -> Result<()> {
4+
std::env::set_var("PROTOC", protobuf_src::protoc());
45
prost_build::compile_protos(&["src/onnx.proto3"], &["src/"])?;
56
Ok(())
67
}

0 commit comments

Comments
 (0)