19 releases (9 breaking)

0.11.0 Mar 22, 2024
0.10.1 Dec 11, 2023
0.9.0 Oct 19, 2023
0.7.2 Jul 20, 2023
0.3.0 Oct 20, 2022

#266 in Hardware support

Download history 17/week @ 2024-03-10 146/week @ 2024-03-17 5/week @ 2024-03-24 91/week @ 2024-03-31

700 downloads per month
Used in mc-sgx-io-untrusted

Apache-2.0

155KB
3K SLoC

MobileCoin's Rust Interface for uRTS

Project ChatLicenseTargetCrates.ioDocs StatusDependency Status

Provides a rust interface for creating (sgx_create_enclave_from_buffer_ex()) and persisting SGX enclaves.

Example usage:

let enclave = EnclaveBuilder::new(&mut enclave_bytes).create().unrwap()
let result = unsafe { ecall_foo(*enclave, arg1, arg2) };

Users are responsible for providing their own bindings to their ECALLs.

Table of Contents

License

Look for the LICENSE file at the root of the repo for more information.

Build Instructions

The workspace can be built with cargo build and tested with cargo test. Either command will recognize the cargo --release flag to build with optimizations.

The Intel SGX SDK needs to be installed.

Intel SGX SDK

See https://github.com/intel/linux-sgx#build-the-intelr-sgx-sdk-and-intelr-sgx-psw-package for installation instructions.

The environment variable SGX_SDK can be used to specify where the SDK is installed. When unset the location will default to /opt/intel/sgxsdk

Features

When no features are present the SGX hardware libraries will be linked in. When the sim feature is present the simulation SGX libraries will be linked in.

References

Dependencies

~2.3–5MB
~100K SLoC