Skip to content

Commit

Permalink
Add rust interface to untrusted SGX
Browse files Browse the repository at this point in the history
Add a rust interface for the untrusted side of the SGX interface.  This
provides the capability to create enclaves and call into them.
  • Loading branch information
nick-mobilecoin committed Jul 15, 2022
1 parent 2941f35 commit 62e6bbc
Show file tree
Hide file tree
Showing 30 changed files with 2,311 additions and 11 deletions.
8 changes: 8 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# For use with https://github.com/DavidAnson/markdownlint and
# https://github.com/igorshubovych/markdownlint-cli
# See https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
# for the schema.
default: true

MD013:
tables: false
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
SGX Libraries and Utilities

[![dependency status](https://deps.rs/repo/github/mobilecoinfoundation/sgx/status.svg)](https://deps.rs/repo/github/mobilecoinfoundation/sgx)

6 changes: 5 additions & 1 deletion core/sys/types/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ fn sgx_library_path() -> String {

fn main() {
let bindings = Builder::default()
.header_contents("core_types.h", "#include <sgx_error.h>")
.header_contents(
"core_types.h",
"#include <sgx_error.h>\n#include <sgx_report.h>",
)
.clang_arg(&format!("-I{}/include", sgx_library_path()))
.newtype_enum("_status_t")
.blocklist_function("*")
.allowlist_type("_status_t")
.allowlist_type("sgx_target_info_t")
.parse_callbacks(Box::new(Callbacks))
.ctypes_prefix("core::ffi")
.generate()
Expand Down
Loading

0 comments on commit 62e6bbc

Please sign in to comment.