Apache Teaclave (incubating) SGX SDK helps developers to write Intel SGX applications in the Rust programming language, and also known as Rust SGX SDK.
Xargo lets you create a sysroot with custom crates. You can virtually put any crate in the sysroot. However, this feature is mainly used to create alternative std facades.
Hypothetically this would be something like:
[dependencies.std]
git = "https://github.com/baidu/sgx_tstd" # or whatever
stage = 2
I tried this at one point and ran into a weird error with rustc (something about a hack to prevent you from accidentally loading crates from the sysroot when you didn't mean to).
That said, if you can get it to work, it would allow any crate which is compatible with the subset of std which sgx_tstd implements to work out-of-the-box.
xargo can potentially be used to swap in
sgx_tstd
forstd
using the custom sysroot crate feature.Hypothetically this would be something like:
I tried this at one point and ran into a weird error with
rustc
(something about a hack to prevent you from accidentally loading crates from the sysroot when you didn't mean to).That said, if you can get it to work, it would allow any crate which is compatible with the subset of
std
whichsgx_tstd
implements to work out-of-the-box.