1#![cfg_attr(not(feature = "std"), no_std)]
19#![cfg_attr(doc, doc = concat!(
20 env!("CARGO_PKG_DESCRIPTION"),
21 "\n",
22 "## Feature flags\n",
23 document_features::document_features!(),
24))]
25
26#[macro_use]
28extern crate alloc;
29
30#[cfg(not(feature = "std"))]
31use libc_alloc::LibcAlloc;
32
33#[cfg(not(feature = "std"))]
34#[global_allocator]
35static ALLOCATOR: LibcAlloc = LibcAlloc;
36
37#[cfg(all(not(feature = "std"), not(feature = "no_panic_handler")))]
38#[panic_handler]
39fn panic(_info: &core::panic::PanicInfo) -> ! {
40 unsafe {
41 optee_utee_sys::TEE_Panic(0);
42 }
43 loop {}
44}
45
46#[cfg(all(not(feature = "std"), feature = "unwind_stubs"))]
50mod unwind_stubs {
51 #[unsafe(no_mangle)]
52 extern "C" fn _Unwind_Resume() -> ! {
53 loop {}
54 }
55
56 #[unsafe(no_mangle)]
57 extern "C" fn rust_eh_personality() {}
58}
59
60pub use self::arithmetical::*;
61pub use self::crypto_op::*;
62pub use self::error::{Error, ErrorKind, Result};
63pub use self::extension::*;
64pub use self::identity::{Identity, LoginType};
65pub use self::object::*;
66pub use self::parameter::{
67 ParamType, ParamTypes, Parameter, Parameters, RawParamType, RawParamTypes, RawParams,
68};
69pub use self::ta_session::{TaSession, TaSessionBuilder};
70pub use self::tee_parameter::{ParamIndex, TeeParams};
71pub use self::time::*;
72pub use self::uuid::*;
73pub use optee_utee_macros::{
74 ta_close_session, ta_create, ta_destroy, ta_invoke_command, ta_open_session,
75};
76
77pub mod trace;
78#[macro_use]
79mod macros;
80pub mod arithmetical;
81pub mod crypto_op;
82mod error;
83pub mod extension;
84pub mod identity;
85pub mod net;
86pub mod object;
87mod parameter;
88pub mod property;
89mod ta_session;
90mod tee_parameter;
91pub mod time;
92pub mod uuid;