Function fortanix_sgx_abi::entry::executable::main_entry[][src]

pub fn main_entry(args: *const ByteBuffer, len: usize) -> !
Expand description

The main entry point of the enclave. This will be the entry point of the first TCS.

The enclave must not return from this entry. Instead, it must call the exit usercall. If the enclave does return from this TCS, and userspace subsequently re-enters this TCS, the enclave must panic.

Arbitrary “command-line arguments” may be passed in from userspace. The enclave must ensure that the all buffers pointed to are outside the enclave. The enclave should deallocate each ByteBuffer as specified by the type. The enclave should deallocate the main buffer by calling free(args, len * size_of::<ByteBuffer>, 1).