18 lines
568 B
Rust
18 lines
568 B
Rust
fn main() {
|
|
// TODO: should be conditional on the target platform (musl vs glibc)
|
|
|
|
#[cfg(feature = "occlum")]
|
|
{
|
|
println!("cargo:rustc-link-search=/opt/occlum/toolchains/dcap_lib/musl");
|
|
println!("cargo:rustc-link-lib=occlum_dcap");
|
|
}
|
|
|
|
// Cargo will automatically know it must look for `libocclum_dcap.a`
|
|
|
|
#[cfg(feature = "tonic")]
|
|
tonic_build::configure()
|
|
.build_server(true)
|
|
.compile_protos(&["examples/echo.proto"], &["examples"])
|
|
.unwrap_or_else(|e| panic!("Failed to compile protos {:?}", e));
|
|
}
|