build(vnt-core): 使用 vendored protoc,不再依赖系统安装
This commit is contained in:
@@ -55,3 +55,4 @@ widestring = "1.2"
|
||||
|
||||
[build-dependencies]
|
||||
prost-build = "0.14"
|
||||
protoc-bin-vendored = "3"
|
||||
|
||||
+8
-1
@@ -1,6 +1,13 @@
|
||||
fn main() {
|
||||
let protoc_path = protoc_bin_vendored::protoc_bin_path()
|
||||
.expect("failed to find vendored protoc");
|
||||
|
||||
let mut config = prost_build::Config::new();
|
||||
|
||||
config.protoc_executable(protoc_path);
|
||||
|
||||
config.protoc_arg("--experimental_allow_proto3_optional");
|
||||
|
||||
config
|
||||
.compile_protos(
|
||||
&[
|
||||
@@ -12,4 +19,4 @@ fn main() {
|
||||
&["proto"],
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user