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
| Concept | UEFI spec | effie |
|---|---|---|
| System Table | EFI_SYSTEM_TABLE | tables::SystemTable |
| Boot Services | EFI_BOOT_SERVICES | tables::BootServices |
| Protocols | various GUIDs | Protocol<P> + per-protocol structs |
| Status codes | EFI_STATUS | Status |
| UTF-16 strings | CHAR16* | 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 thelogfeature is enabled, and silently discard all arguments otherwise. - protocols
- UEFI protocol implementations.
- tables
- UEFI firmware tables.
Macros§
Structs§
- Allocator
- UEFI-backed global allocator.
- Char
Indices - Iterator over
(code_unit_index, char)pairs of aWStr. - Chars
- Iterator over the
charvalues of aWStr. - 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
Noneif called beforeefi_mainhas initialised the global. - system_
table - Returns the UEFI System Table.
- system_
table_ raw - Returns the UEFI System Table pointer, or
Noneif called beforeefi_mainhas initialised the global (e.g. during static initialisation).
Type Aliases§
- Result
- UEFI result type alias.