From 418e1b9dbf7bfaaa0685b6d739015ed8f630ed58 Mon Sep 17 00:00:00 2001 From: Valentyn Faychuk Date: Sun, 6 Oct 2024 13:28:47 +0300 Subject: [PATCH] add todo suggestions --- Cargo.toml | 1 + build.rs | 2 ++ build_client.sh | 1 + 3 files changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index b8670c7..9d57df6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,6 +70,7 @@ tonic-build = "0.12" [features] default = [] +# TOOD: rename to testing and reverse uses in the code occlum = [] reqwest = ["dep:reqwest"] actix-web = ["dep:actix-web", "actix-service", "actix-http"] diff --git a/build.rs b/build.rs index 665dccb..70e4853 100644 --- a/build.rs +++ b/build.rs @@ -1,9 +1,11 @@ fn main() { + // TODO: make this conditional on occlum feature // TODO: should be conditional on the target platform (musl vs glibc) println!("cargo:rustc-link-search=/opt/occlum/toolchains/dcap_lib/musl"); // Cargo will automatically know it must look for `libocclum_dcap.a` println!("cargo:rustc-link-lib=occlum_dcap"); + // TODO: make this conditional if compiling grpcs examples tonic_build::configure() .build_server(true) .compile(&["examples/echo.proto"], &["examples"]) diff --git a/build_client.sh b/build_client.sh index fce3458..c221ff9 100755 --- a/build_client.sh +++ b/build_client.sh @@ -34,6 +34,7 @@ occlum init && rm -rf image cp ../Occlum.json ./ copy_bom -f ../client.yaml --root image --include-dir /opt/occlum/etc/template # TODO: "--enable-edmm Y" must be only for platforms that support SGX2 +# TODO: make sure the bundle needs SGX2 to run since SGX1 is vulnerable to https://x.com/PratyushRT/status/1828183761055330373 occlum build --sign-key ../examples/signing_key.pem occlum package client.tar.gz