Skip to main content

Crate effie

Crate effie 

Source
Expand description

effie – idiomatic UEFI API in Rust.

A #![no_std] wrapper around UEFI firmware interfaces that closely maps to the UEFI specification rather than abstracting it away. Every protocol, table, and status code corresponds directly to its UEFI counterpart.

§Entry point

effie owns the efi_main entry symbol. Your application provides a #[unsafe(no_mangle)] fn main() -> Result:

ⓘ
#![no_main]
#![no_std]
extern crate alloc;

#[unsafe(no_mangle)]
fn main() -> effie::Result {
    let mut con_out = effie::system_table().con_out()?;
    con_out.output_line(effie::w!("Hello, UEFI!"))
}

§Key concepts

ConceptUEFI speceffie
System TableEFI_SYSTEM_TABLEtables::SystemTable
Boot ServicesEFI_BOOT_SERVICEStables::BootServices
Protocolsvarious GUIDsProtocol<P> + per-protocol structs
Status codesEFI_STATUSStatus
UTF-16 stringsCHAR16*WStr / WString

§Cargo features

No features are currently defined.

Re-exports§

pub use guid::Guid;

Modules§

guid
UEFI GUID type.
log
Logging macros that forward to the [log] crate when the log feature is enabled, and silently discard all arguments otherwise.
protocols
UEFI protocol implementations.
tables
UEFI firmware tables.

Macros§

guid
Create a Guid from a string at compile time.
w
Compile-time &WStr literal.

Structs§

Allocator
UEFI-backed global allocator.
CharIndices
Iterator over (code_unit_index, char) pairs of a WStr.
Chars
Iterator over the char values of a WStr.
Event
UEFI event handle.
Handle
UEFI handle.
Protocol
RAII wrapper around a UEFI protocol interface pointer.
Status
UEFI status code.
Time
UEFI time structure.
WStr
A null-terminated UTF-16 string slice.
WString
An owned, heap-allocated null-terminated UTF-16 string.

Traits§

HasGuid
A protocol type that has an associated UEFI protocol GUID.
HasProtocol
Marker trait for UEFI protocol types.

Functions§

image_handle
Returns the image handle that was passed to efi_main.
image_handle_raw
Returns the image handle, or None if called before efi_main has initialised the global.
system_table
Returns the UEFI System Table.
system_table_raw
Returns the UEFI System Table pointer, or None if called before efi_main has initialised the global (e.g. during static initialisation).

Type Aliases§

Result
UEFI result type alias.