#[entry]
Expand description
Custom attribute for a UEFI executable entry point.
This attribute modifies a function to mark it as the entry point for
a UEFI executable. The function must have two parameters, Handle
and SystemTable<Boot>
, and return a Status
. The function can
optionally be unsafe
.
Due to internal implementation details the parameters must both be
named, so arg
or _arg
are allowed, but not _
.
The BootServices::set_image_handle
function will be called
automatically with the image Handle
argument.
Examples
#![no_main]
use uefi::prelude::*;
#[entry]
fn main(image: Handle, st: SystemTable<Boot>) -> Status {
Status::SUCCESS
}