Protocol Buffers - Google's data interchange format (grpc依赖) https://developers.google.com/protocol-buffers/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
518 B

fn main() {
cc::Build::new()
.flag("-std=c99")
// TODO: Come up with a way to enable lto
// .flag("-flto=thin")
.warnings(false)
.include("src")
.file("src/upb.c")
.file("src/utf8_range.c")
.file("src/upb/upb_api.c")
.define("UPB_BUILD_API", Some("1"))
.define("PROTOBUF_CARGO", Some("1"))
.compile("upb");
let path = std::path::Path::new("src");
println!("cargo:include={}", path.canonicalize().unwrap().display())
}