Skip to content

Commit

Permalink
Remove use of size_t in bindings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nick-mobilecoin committed Oct 24, 2022
1 parent edf5777 commit 27456cf
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions tcrypto/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

#![doc = include_str!("../README.md")]
#![no_std]
#![feature(c_size_t)]
#![allow(
non_upper_case_globals,
non_camel_case_types,
non_snake_case,
rustdoc::broken_intra_doc_links
)]

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

pub use mc_sgx_tcrypto_sys_types::{
Expand Down
2 changes: 0 additions & 2 deletions trts/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

#![doc = include_str!("../README.md")]
#![no_std]
#![feature(c_size_t)]
#![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;

include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
2 changes: 0 additions & 2 deletions tservice/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
#![doc = include_str!("../README.md")]
#![no_std]
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
#![feature(c_size_t)]

use core::ffi::c_size_t as size_t;
use mc_sgx_core_sys_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,
Expand Down
2 changes: 0 additions & 2 deletions tservice/sys/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

#![doc = include_str!("../README.md")]
#![no_std]
#![feature(c_size_t)]
#![allow(
clippy::missing_safety_doc,
non_camel_case_types,
non_snake_case,
non_upper_case_globals
)]

use core::ffi::c_size_t as size_t;
use mc_sgx_core_sys_types::{
default_for_byte_struct, sgx_attributes_t, sgx_cpu_svn_t, sgx_isv_svn_t, sgx_key_request_t,
sgx_measurement_t, sgx_misc_select_t, sgx_prod_id_t, sgx_report_t, sgx_target_info_t,
Expand Down
2 changes: 0 additions & 2 deletions tstdc/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

#![doc = include_str!("../README.md")]
#![no_std]
#![feature(c_size_t)]
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]

pub use core::ffi::c_size_t as size_t;
use mc_sgx_core_sys_types::sgx_status_t;
use mc_sgx_tstdc_sys_types::{
sgx_spinlock_t, sgx_thread_cond_t, sgx_thread_condattr_t, sgx_thread_mutex_t,
Expand Down
3 changes: 0 additions & 3 deletions tstdc/sys/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

#![doc = include_str!("../README.md")]
#![no_std]
#![feature(c_size_t)]
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]

pub use core::ffi::c_size_t as size_t;

include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
2 changes: 0 additions & 2 deletions urts/sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// Copyright (c) 2022 The MobileCoin Foundation

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

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

Expand Down

0 comments on commit 27456cf

Please sign in to comment.