Skip to content

Commit

Permalink
Rename sys crates to ffi
Browse files Browse the repository at this point in the history
The `mc-sgx-???-sys` crates have been renamed to `mc-sgx-???-ffi`.  This
renaming is to allow for a more amenable API with a `sys` feature to
utilize the system version of the SGX SDK.
  • Loading branch information
nick-mobilecoin committed Jul 28, 2022
1 parent 22af30e commit d8ac511
Show file tree
Hide file tree
Showing 33 changed files with 58 additions and 58 deletions.
38 changes: 19 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[workspace]
resolver = "2"
members = [
"core/sys/types",
"core/ffi/types",
"core/build",
"crypto/sys/types",
"crypto/sys",
"crypto/ffi/types",
"crypto/ffi",
"panic/abort",
"quote_verify",
"service/sys",
"service/sys/types",
"trts/sys",
"service/ffi",
"service/ffi/types",
"trts/ffi",
"urts",
"urts/sys",
"urts/sys/types",
"urts/ffi",
"urts/ffi/types",
]
exclude = [
"test_enclave",
Expand Down
2 changes: 1 addition & 1 deletion core/sys/types/Cargo.toml → core/ffi/types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "mc-sgx-core-sys-types"
name = "mc-sgx-core-ffi-types"
version = "0.1.0"
edition = "2021"

Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions crypto/sys/Cargo.toml → crypto/ffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "mc-sgx-crypto-sys"
name = "mc-sgx-crypto-ffi"
version = "0.1.0"
edition = "2021"

[dependencies]
mc-sgx-core-sys-types = { path = "../../core/sys/types" }
mc-sgx-crypto-sys-types = { path = "types" }
mc-sgx-core-ffi-types = { path = "../../core/ffi/types" }
mc-sgx-crypto-ffi-types = { path = "types" }

[dev-dependencies]
sha2 = "0.10.2"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions crypto/sys/src/lib.rs → crypto/ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case)]

pub use core::ffi::c_size_t as size_t;
pub use mc_sgx_core_sys_types::sgx_status_t;
pub use mc_sgx_core_ffi_types::sgx_status_t;

pub use mc_sgx_crypto_sys_types::{
pub use mc_sgx_crypto_ffi_types::{
sgx_aes_ctr_128bit_key_t, sgx_aes_gcm_128bit_key_t, sgx_aes_gcm_128bit_tag_t,
sgx_aes_state_handle_t, sgx_cmac_128bit_key_t, sgx_cmac_128bit_tag_t, sgx_cmac_state_handle_t,
sgx_ec256_dh_shared_t, sgx_ec256_private_t, sgx_ec256_public_t, sgx_ec256_signature_t,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "mc-sgx-crypto-sys-types"
name = "mc-sgx-crypto-ffi-types"
version = "0.1.0"
edition = "2021"

Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions service/sys/Cargo.toml → service/ffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "mc-sgx-service-sys"
name = "mc-sgx-service-ffi"
version = "0.1.0"
edition = "2021"

[dependencies]
mc-sgx-service-sys-types = { path = "types" }
mc-sgx-core-sys-types = { path = "../../core/sys/types" }
mc-sgx-service-ffi-types = { path = "types" }
mc-sgx-core-ffi-types = { path = "../../core/ffi/types" }

[build-dependencies]
bindgen = "0.60.1"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions service/sys/src/lib.rs → service/ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#![no_std]
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]

use mc_sgx_core_sys_types::{
use mc_sgx_core_ffi_types::{
sgx_attributes_t, sgx_key_128bit_t, sgx_key_request_t, sgx_misc_select_t, sgx_report_data_t,
sgx_report_t, sgx_status_t, sgx_target_info_t,
};
use mc_sgx_service_sys_types::{
use mc_sgx_service_ffi_types::{
sgx_dh_msg1_t, sgx_dh_msg2_t, sgx_dh_msg3_t, sgx_dh_session_enclave_identity_t,
sgx_dh_session_role_t, sgx_dh_session_t, sgx_report2_mac_struct_t, sgx_sealed_data_t,
};
Expand Down
4 changes: 2 additions & 2 deletions service/sys/types/Cargo.toml → service/ffi/types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "mc-sgx-service-sys-types"
name = "mc-sgx-service-ffi-types"
version = "0.1.0"
edition = "2021"

[dependencies]
mc-sgx-core-sys-types = { path = "../../../core/sys/types" }
mc-sgx-core-ffi-types = { path = "../../../core/ffi/types" }

[build-dependencies]
bindgen = "0.60.1"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
)]

mod bindings {
use mc_sgx_core_sys_types::{
use mc_sgx_core_ffi_types::{
sgx_attributes_t, sgx_config_id_t, sgx_config_svn_t, sgx_isv_svn_t, sgx_isvext_prod_id_t,
sgx_isvfamily_id_t, sgx_key_request_t, sgx_mac_t, sgx_misc_select_t, sgx_prod_id_t,
sgx_report_body_t, sgx_report_t, sgx_target_info_t,
Expand Down
4 changes: 2 additions & 2 deletions test_enclave/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "0.1.0"
edition = "2021"

[dependencies]
mc-sgx-urts-sys-types = { path = "../urts/sys/types" }
mc-sgx-core-sys-types = { path = "../core/sys/types" }
mc-sgx-urts-ffi-types = { path = "../urts/ffi/types" }
mc-sgx-core-ffi-types = { path = "../core/ffi/types" }

[features]
hw = []
Expand Down
4 changes: 2 additions & 2 deletions test_enclave/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
pub static ENCLAVE: &'static [u8] =
include_bytes!(concat!(env!("OUT_DIR"), "/libenclave.signed.so"));

use mc_sgx_core_sys_types::sgx_status_t;
use mc_sgx_urts_sys_types::sgx_enclave_id_t;
use mc_sgx_core_ffi_types::sgx_status_t;
use mc_sgx_urts_ffi_types::sgx_enclave_id_t;
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
4 changes: 2 additions & 2 deletions trts/sys/Cargo.toml → trts/ffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "mc-sgx-trts-sys"
name = "mc-sgx-trts-ffi"
version = "0.1.0"
edition = "2021"

Expand All @@ -12,7 +12,7 @@ default = []
hw = []

[dependencies]
mc-sgx-core-sys-types = { path = "../../core/sys/types" }
mc-sgx-core-ffi-types = { path = "../../core/ffi/types" }

[build-dependencies]
bindgen = "0.60.1"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion trts/sys/src/lib.rs → trts/ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case)]

pub use core::ffi::c_size_t as size_t;
pub use mc_sgx_core_sys_types::sgx_status_t;
pub use mc_sgx_core_ffi_types::sgx_status_t;

include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
4 changes: 2 additions & 2 deletions urts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ version = "0.1.0"
edition = "2021"

[dependencies]
mc-sgx-urts-sys = { path = "sys", default-features = false }
mc-sgx-urts-ffi = { path = "ffi", default-features = false }

[features]
hw = ["mc-sgx-urts-sys/hw"]
hw = ["mc-sgx-urts-ffi/hw"]
default = []

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions urts/sys/Cargo.toml → urts/ffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "mc-sgx-urts-sys"
name = "mc-sgx-urts-ffi"
version = "0.1.0"
edition = "2021"

Expand All @@ -8,8 +8,8 @@ hw = []
default = []

[dependencies]
mc-sgx-urts-sys-types = { path = "types" }
mc-sgx-core-sys-types = { path = "../../core/sys/types" }
mc-sgx-urts-ffi-types = { path = "types" }
mc-sgx-core-ffi-types = { path = "../../core/ffi/types" }

[build-dependencies]
bindgen = "0.60.1"
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions urts/sys/src/lib.rs → urts/ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]

pub use core::ffi::c_size_t as size_t;
pub use mc_sgx_core_sys_types::{sgx_status_t, sgx_target_info_t};
pub use mc_sgx_urts_sys_types::{sgx_enclave_id_t, sgx_launch_token_t, sgx_misc_attribute_t};
pub use mc_sgx_core_ffi_types::{sgx_status_t, sgx_target_info_t};
pub use mc_sgx_urts_ffi_types::{sgx_enclave_id_t, sgx_launch_token_t, sgx_misc_attribute_t};

include!(concat!(env!("OUT_DIR"), "/bindings.rs"));

Expand Down
2 changes: 1 addition & 1 deletion urts/sys/types/Cargo.toml → urts/ffi/types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "mc-sgx-urts-sys-types"
name = "mc-sgx-urts-ffi-types"
version = "0.1.0"
edition = "2021"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion urts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! Provides rust wrappers for the SGX untrusted runtime system (uRTS)
//! functionality
use mc_sgx_urts_sys::{
use mc_sgx_urts_ffi::{
sgx_create_enclave_from_buffer_ex, sgx_destroy_enclave, sgx_enclave_id_t, sgx_status_t,
};
use std::{ops::Deref, os::raw::c_int, ptr};
Expand Down

0 comments on commit d8ac511

Please sign in to comment.