]> git.lizzy.rs Git - rust.git/blob - src/libstd/os/fortanix_sgx/mod.rs
Fix `std::os::fortanix_sgx::usercalls::raw::UsercallNrs`
[rust.git] / src / libstd / os / fortanix_sgx / mod.rs
1 //! Functionality specific to the `x86_64-fortanix-unknown-sgx` target.
2 //!
3 //! This includes functions to deal with memory isolation, usercalls, and the
4 //! SGX instruction set.
5
6 #![deny(missing_docs, missing_debug_implementations)]
7 #![unstable(feature = "sgx_platform", issue = "56975")]
8
9 /// Low-level interfaces to usercalls. See the [ABI documentation] for more
10 /// information.
11 ///
12 /// [ABI documentation]: https://docs.rs/fortanix-sgx-abi/
13 pub mod usercalls {
14     pub use sys::abi::usercalls::*;
15
16     /// Primitives for allocating memory in userspace as well as copying data
17     /// to and from user memory.
18     pub mod alloc {
19         pub use sys::abi::usercalls::alloc;
20     }
21
22     /// Lowest-level interfaces to usercalls and usercall ABI type definitions.
23     pub mod raw {
24         pub use sys::abi::usercalls::raw::{do_usercall, Usercalls as UsercallNrs};
25         pub use sys::abi::usercalls::raw::{accept_stream, alloc, async_queues, bind_stream, close,
26                                            connect_stream, exit, flush, free, insecure_time,
27                                            launch_thread, read, read_alloc, send, wait, write};
28
29         // fortanix-sgx-abi re-exports
30         pub use sys::abi::usercalls::raw::{ByteBuffer, FifoDescriptor, Return, Usercall};
31         pub use sys::abi::usercalls::raw::Error;
32         pub use sys::abi::usercalls::raw::{EV_RETURNQ_NOT_EMPTY, EV_UNPARK, EV_USERCALLQ_NOT_FULL,
33                                            FD_STDERR, FD_STDIN, FD_STDOUT, RESULT_SUCCESS,
34                                            USERCALL_USER_DEFINED, WAIT_INDEFINITE, WAIT_NO};
35         pub use sys::abi::usercalls::raw::{Fd, Result, Tcs};
36     }
37 }
38
39 /// Functions for querying mapping information for pointers.
40 pub mod mem {
41     pub use sys::abi::mem::*;
42 }
43
44 pub use sys::ext::{io, arch, ffi};