occlum/ngo

Many SGX examples of crates don't work

ShuochengWang opened this issue · 0 comments

In current NGO, many sgx examples of sub crates don't work, e.g., io-uring/examples/sgx, crates/io-uring-callback/examples/sgx.

The reason why we create these sgx examples is to test out code both in sgx env and host env. Since these crates are compatible with SGX and host.

However, these examples lack maintenance, so they can't be compiled now.
The compile error mainly because of:

  1. path error, use error rust-sgx-sdk path
  2. ocall link error, e.g., io-uring/ocalls is lib type before, hence we can add it directly in untrusted app's cargo.toml. However, io-uring/ocalls is changed to staticlib now, we can not add it in cargo.toml, and we can not link it in rust code (in build.rs), since the staticlib of rust crate will conflict with untrusted app's rust code