This is an automated email from the ASF dual-hosted git repository. yuanz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git
commit a6b5cfbfbbe039aa17d954122f95c7d2b8fcf158 Author: Yuan Zhuang <[email protected]> AuthorDate: Thu Oct 17 12:47:24 2024 +0000 examples: polish linking script - remove wildcard imports: "use core::ffi::*;" - since "c_size_t" is an unstable feature for current Rustc (2024-05-14), replace them with "usize", which is equivalent on ARM32 and ARM64. --- examples/acipher-rs/ta/src/main.rs | 1 - examples/acipher-rs/ta/ta_static.rs | 6 +++--- examples/aes-rs/ta/src/main.rs | 1 - examples/aes-rs/ta/ta_static.rs | 6 +++--- examples/authentication-rs/ta/src/main.rs | 1 - examples/authentication-rs/ta/ta_static.rs | 6 +++--- examples/big_int-rs/ta/src/main.rs | 1 - examples/big_int-rs/ta/ta_static.rs | 6 +++--- examples/diffie_hellman-rs/ta/src/main.rs | 1 - examples/diffie_hellman-rs/ta/ta_static.rs | 6 +++--- examples/digest-rs/ta/src/main.rs | 1 - examples/digest-rs/ta/ta_static.rs | 6 +++--- examples/error_handling-rs/ta/src/main.rs | 1 - examples/error_handling-rs/ta/ta_static.rs | 6 +++--- examples/hello_world-rs/ta/src/main.rs | 1 - examples/hello_world-rs/ta/ta_static.rs | 6 +++--- examples/hotp-rs/ta/src/main.rs | 1 - examples/hotp-rs/ta/ta_static.rs | 6 +++--- examples/message_passing_interface-rs/ta/src/main.rs | 1 - examples/message_passing_interface-rs/ta/ta_static.rs | 6 +++--- examples/random-rs/ta/src/main.rs | 1 - examples/random-rs/ta/ta_static.rs | 6 +++--- examples/secure_storage-rs/ta/src/main.rs | 1 - examples/secure_storage-rs/ta/ta_static.rs | 6 +++--- examples/serde-rs/ta/src/main.rs | 1 - examples/serde-rs/ta/ta_static.rs | 6 +++--- examples/signature_verification-rs/ta/src/main.rs | 1 - examples/signature_verification-rs/ta/ta_static.rs | 6 +++--- examples/supp_plugin-rs/ta/src/main.rs | 1 - examples/supp_plugin-rs/ta/ta_static.rs | 6 +++--- examples/tcp_client-rs/ta/src/main.rs | 1 - examples/tcp_client-rs/ta/ta_static.rs | 6 +++--- examples/time-rs/ta/src/main.rs | 1 - examples/time-rs/ta/ta_static.rs | 6 +++--- examples/tls_client-rs/ta/src/main.rs | 1 - examples/tls_client-rs/ta/ta_static.rs | 6 +++--- examples/tls_server-rs/ta/src/main.rs | 1 - examples/tls_server-rs/ta/ta_static.rs | 6 +++--- examples/udp_socket-rs/ta/src/main.rs | 1 - examples/udp_socket-rs/ta/ta_static.rs | 6 +++--- 40 files changed, 60 insertions(+), 80 deletions(-) diff --git a/examples/acipher-rs/ta/src/main.rs b/examples/acipher-rs/ta/src/main.rs index b8ea685..8418e07 100644 --- a/examples/acipher-rs/ta/src/main.rs +++ b/examples/acipher-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] extern crate alloc; diff --git a/examples/acipher-rs/ta/ta_static.rs b/examples/acipher-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/acipher-rs/ta/ta_static.rs +++ b/examples/acipher-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/aes-rs/ta/src/main.rs b/examples/aes-rs/ta/src/main.rs index fcceb7b..7161285 100644 --- a/examples/aes-rs/ta/src/main.rs +++ b/examples/aes-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] extern crate alloc; diff --git a/examples/aes-rs/ta/ta_static.rs b/examples/aes-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/aes-rs/ta/ta_static.rs +++ b/examples/aes-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/authentication-rs/ta/src/main.rs b/examples/authentication-rs/ta/src/main.rs index 02bdcaa..247aa6b 100644 --- a/examples/authentication-rs/ta/src/main.rs +++ b/examples/authentication-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] extern crate alloc; diff --git a/examples/authentication-rs/ta/ta_static.rs b/examples/authentication-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/authentication-rs/ta/ta_static.rs +++ b/examples/authentication-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/big_int-rs/ta/src/main.rs b/examples/big_int-rs/ta/src/main.rs index 6049176..01ae6f0 100644 --- a/examples/big_int-rs/ta/src/main.rs +++ b/examples/big_int-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] use optee_utee::BigInt; use optee_utee::{ diff --git a/examples/big_int-rs/ta/ta_static.rs b/examples/big_int-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/big_int-rs/ta/ta_static.rs +++ b/examples/big_int-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/diffie_hellman-rs/ta/src/main.rs b/examples/diffie_hellman-rs/ta/src/main.rs index d812eb5..7a08abc 100644 --- a/examples/diffie_hellman-rs/ta/src/main.rs +++ b/examples/diffie_hellman-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] extern crate alloc; diff --git a/examples/diffie_hellman-rs/ta/ta_static.rs b/examples/diffie_hellman-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/diffie_hellman-rs/ta/ta_static.rs +++ b/examples/diffie_hellman-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/digest-rs/ta/src/main.rs b/examples/digest-rs/ta/src/main.rs index 5080bf8..1cc159e 100644 --- a/examples/digest-rs/ta/src/main.rs +++ b/examples/digest-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] extern crate alloc; diff --git a/examples/digest-rs/ta/ta_static.rs b/examples/digest-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/digest-rs/ta/ta_static.rs +++ b/examples/digest-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/error_handling-rs/ta/src/main.rs b/examples/error_handling-rs/ta/src/main.rs index 7f13f91..755e5af 100644 --- a/examples/error_handling-rs/ta/src/main.rs +++ b/examples/error_handling-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] extern crate alloc; diff --git a/examples/error_handling-rs/ta/ta_static.rs b/examples/error_handling-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/error_handling-rs/ta/ta_static.rs +++ b/examples/error_handling-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/hello_world-rs/ta/src/main.rs b/examples/hello_world-rs/ta/src/main.rs index f952896..8ef0567 100644 --- a/examples/hello_world-rs/ta/src/main.rs +++ b/examples/hello_world-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] use optee_utee::{ ta_close_session, ta_create, ta_destroy, ta_invoke_command, ta_open_session, trace_println, diff --git a/examples/hello_world-rs/ta/ta_static.rs b/examples/hello_world-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/hello_world-rs/ta/ta_static.rs +++ b/examples/hello_world-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/hotp-rs/ta/src/main.rs b/examples/hotp-rs/ta/src/main.rs index 8bc1720..2d20f72 100644 --- a/examples/hotp-rs/ta/src/main.rs +++ b/examples/hotp-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] extern crate alloc; diff --git a/examples/hotp-rs/ta/ta_static.rs b/examples/hotp-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/hotp-rs/ta/ta_static.rs +++ b/examples/hotp-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/message_passing_interface-rs/ta/src/main.rs b/examples/message_passing_interface-rs/ta/src/main.rs index e79f78b..5b9f361 100644 --- a/examples/message_passing_interface-rs/ta/src/main.rs +++ b/examples/message_passing_interface-rs/ta/src/main.rs @@ -16,7 +16,6 @@ // under the License. #![no_main] -#![feature(c_size_t)] use optee_utee::{ ta_close_session, ta_create, ta_destroy, ta_invoke_command, ta_open_session, trace_println, diff --git a/examples/message_passing_interface-rs/ta/ta_static.rs b/examples/message_passing_interface-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/message_passing_interface-rs/ta/ta_static.rs +++ b/examples/message_passing_interface-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/random-rs/ta/src/main.rs b/examples/random-rs/ta/src/main.rs index 92ec673..b419b28 100644 --- a/examples/random-rs/ta/src/main.rs +++ b/examples/random-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] extern crate alloc; diff --git a/examples/random-rs/ta/ta_static.rs b/examples/random-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/random-rs/ta/ta_static.rs +++ b/examples/random-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/secure_storage-rs/ta/src/main.rs b/examples/secure_storage-rs/ta/src/main.rs index 8ffce52..f1bc47f 100644 --- a/examples/secure_storage-rs/ta/src/main.rs +++ b/examples/secure_storage-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] extern crate alloc; diff --git a/examples/secure_storage-rs/ta/ta_static.rs b/examples/secure_storage-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/secure_storage-rs/ta/ta_static.rs +++ b/examples/secure_storage-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/serde-rs/ta/src/main.rs b/examples/serde-rs/ta/src/main.rs index c0918c2..7f239c0 100644 --- a/examples/serde-rs/ta/src/main.rs +++ b/examples/serde-rs/ta/src/main.rs @@ -18,7 +18,6 @@ #![no_main] // this is the workaround for the error: // error[E0658]: use of unstable library feature 'c_size_t' -#![feature(c_size_t)] use optee_utee::{ ta_close_session, ta_create, ta_destroy, ta_invoke_command, ta_open_session, trace_println, diff --git a/examples/serde-rs/ta/ta_static.rs b/examples/serde-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/serde-rs/ta/ta_static.rs +++ b/examples/serde-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/signature_verification-rs/ta/src/main.rs b/examples/signature_verification-rs/ta/src/main.rs index 0f34cc3..cc03b89 100644 --- a/examples/signature_verification-rs/ta/src/main.rs +++ b/examples/signature_verification-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] extern crate alloc; diff --git a/examples/signature_verification-rs/ta/ta_static.rs b/examples/signature_verification-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/signature_verification-rs/ta/ta_static.rs +++ b/examples/signature_verification-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/supp_plugin-rs/ta/src/main.rs b/examples/supp_plugin-rs/ta/src/main.rs index 307064a..c1b4a79 100644 --- a/examples/supp_plugin-rs/ta/src/main.rs +++ b/examples/supp_plugin-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] extern crate alloc; diff --git a/examples/supp_plugin-rs/ta/ta_static.rs b/examples/supp_plugin-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/supp_plugin-rs/ta/ta_static.rs +++ b/examples/supp_plugin-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/tcp_client-rs/ta/src/main.rs b/examples/tcp_client-rs/ta/src/main.rs index de5c12e..e871224 100644 --- a/examples/tcp_client-rs/ta/src/main.rs +++ b/examples/tcp_client-rs/ta/src/main.rs @@ -16,7 +16,6 @@ // under the License. #![no_main] -#![feature(c_size_t)] use optee_utee::net::TcpStream; use optee_utee::{ diff --git a/examples/tcp_client-rs/ta/ta_static.rs b/examples/tcp_client-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/tcp_client-rs/ta/ta_static.rs +++ b/examples/tcp_client-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/time-rs/ta/src/main.rs b/examples/time-rs/ta/src/main.rs index fbd73a1..9ec91da 100644 --- a/examples/time-rs/ta/src/main.rs +++ b/examples/time-rs/ta/src/main.rs @@ -17,7 +17,6 @@ #![no_std] #![no_main] -#![feature(c_size_t)] use optee_utee::Time; use optee_utee::{ diff --git a/examples/time-rs/ta/ta_static.rs b/examples/time-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/time-rs/ta/ta_static.rs +++ b/examples/time-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/tls_client-rs/ta/src/main.rs b/examples/tls_client-rs/ta/src/main.rs index b1de410..fb64c4b 100644 --- a/examples/tls_client-rs/ta/src/main.rs +++ b/examples/tls_client-rs/ta/src/main.rs @@ -16,7 +16,6 @@ // under the License. #![no_main] -#![feature(c_size_t)] use optee_utee::net::TcpStream; use optee_utee::{ diff --git a/examples/tls_client-rs/ta/ta_static.rs b/examples/tls_client-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/tls_client-rs/ta/ta_static.rs +++ b/examples/tls_client-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/tls_server-rs/ta/src/main.rs b/examples/tls_server-rs/ta/src/main.rs index 0beb9ec..2b4ebb7 100644 --- a/examples/tls_server-rs/ta/src/main.rs +++ b/examples/tls_server-rs/ta/src/main.rs @@ -16,7 +16,6 @@ // under the License. #![no_main] -#![feature(c_size_t)] use optee_utee::{ ta_close_session, ta_create, ta_destroy, ta_invoke_command, ta_open_session, trace_println, diff --git a/examples/tls_server-rs/ta/ta_static.rs b/examples/tls_server-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/tls_server-rs/ta/ta_static.rs +++ b/examples/tls_server-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ diff --git a/examples/udp_socket-rs/ta/src/main.rs b/examples/udp_socket-rs/ta/src/main.rs index 4f3025d..812f418 100644 --- a/examples/udp_socket-rs/ta/src/main.rs +++ b/examples/udp_socket-rs/ta/src/main.rs @@ -16,7 +16,6 @@ // under the License. #![no_main] -#![feature(c_size_t)] use optee_utee::net::UdpSocket; use optee_utee::{ diff --git a/examples/udp_socket-rs/ta/ta_static.rs b/examples/udp_socket-rs/ta/ta_static.rs index 53ca210..20e1d97 100644 --- a/examples/udp_socket-rs/ta/ta_static.rs +++ b/examples/udp_socket-rs/ta/ta_static.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -use core::ffi::*; +use core::ffi::{c_int, c_void}; use core::mem; use core::primitive::u64; @@ -39,13 +39,13 @@ pub static ta_head: optee_utee_sys::ta_head = optee_utee_sys::ta_head { pub static ta_heap: [u8; TA_DATA_SIZE as usize] = [0; TA_DATA_SIZE as usize]; #[no_mangle] -pub static ta_heap_size: c_size_t = mem::size_of::<u8>() * TA_DATA_SIZE as usize; +pub static ta_heap_size: usize = mem::size_of::<u8>() * TA_DATA_SIZE as usize; static FLAG_BOOL: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_SINGLE_INSTANCE) != 0; static FLAG_MULTI: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_MULTI_SESSION) != 0; static FLAG_INSTANCE: bool = (TA_FLAGS & optee_utee_sys::TA_FLAG_INSTANCE_KEEP_ALIVE) != 0; #[no_mangle] -pub static ta_num_props: c_size_t = 9; +pub static ta_num_props: usize = 9; #[no_mangle] pub static ta_props: [optee_utee_sys::user_ta_property; 9] = [ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
