Skip to content

Commit 27456cf

Browse files
Remove use of size_t in bindings
Bindgen now supports mapping size_t to usize by default and doing a build time check to ensure they are the same size. See rust-lang/rust-bindgen#2062.
1 parent edf5777 commit 27456cf

File tree

7 files changed

+0
-15
lines changed

7 files changed

+0
-15
lines changed

tcrypto/sys/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
#![doc = include_str!("../README.md")]
44
#![no_std]
5-
#![feature(c_size_t)]
65
#![allow(
76
non_upper_case_globals,
87
non_camel_case_types,
98
non_snake_case,
109
rustdoc::broken_intra_doc_links
1110
)]
1211

13-
use core::ffi::c_size_t as size_t;
1412
use mc_sgx_core_sys_types::sgx_status_t;
1513

1614
pub use mc_sgx_tcrypto_sys_types::{

trts/sys/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
#![doc = include_str!("../README.md")]
44
#![no_std]
5-
#![feature(c_size_t)]
65
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case)]
76

8-
pub use core::ffi::c_size_t as size_t;
97
pub use mc_sgx_core_sys_types::sgx_status_t;
108

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

tservice/sys/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
#![doc = include_str!("../README.md")]
44
#![no_std]
55
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
6-
#![feature(c_size_t)]
76

8-
use core::ffi::c_size_t as size_t;
97
use mc_sgx_core_sys_types::{
108
sgx_attributes_t, sgx_key_128bit_t, sgx_key_request_t, sgx_misc_select_t, sgx_report_data_t,
119
sgx_report_t, sgx_status_t, sgx_target_info_t,

tservice/sys/types/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
#![doc = include_str!("../README.md")]
44
#![no_std]
5-
#![feature(c_size_t)]
65
#![allow(
76
clippy::missing_safety_doc,
87
non_camel_case_types,
98
non_snake_case,
109
non_upper_case_globals
1110
)]
1211

13-
use core::ffi::c_size_t as size_t;
1412
use mc_sgx_core_sys_types::{
1513
default_for_byte_struct, sgx_attributes_t, sgx_cpu_svn_t, sgx_isv_svn_t, sgx_key_request_t,
1614
sgx_measurement_t, sgx_misc_select_t, sgx_prod_id_t, sgx_report_t, sgx_target_info_t,

tstdc/sys/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
#![doc = include_str!("../README.md")]
44
#![no_std]
5-
#![feature(c_size_t)]
65
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
76

8-
pub use core::ffi::c_size_t as size_t;
97
use mc_sgx_core_sys_types::sgx_status_t;
108
use mc_sgx_tstdc_sys_types::{
119
sgx_spinlock_t, sgx_thread_cond_t, sgx_thread_condattr_t, sgx_thread_mutex_t,

tstdc/sys/types/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
#![doc = include_str!("../README.md")]
44
#![no_std]
5-
#![feature(c_size_t)]
65
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
76

8-
pub use core::ffi::c_size_t as size_t;
9-
107
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));

urts/sys/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// Copyright (c) 2022 The MobileCoin Foundation
22

33
#![doc = include_str!("../README.md")]
4-
#![feature(c_size_t)]
54
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
65

7-
use core::ffi::c_size_t as size_t;
86
use mc_sgx_core_sys_types::{sgx_status_t, sgx_target_info_t};
97
use mc_sgx_urts_sys_types::{sgx_enclave_id_t, sgx_launch_token_t, sgx_misc_attribute_t};
108

0 commit comments

Comments
 (0)