25 releases (breaking)

new 0.18.0 May 15, 2023
0.17.0 Mar 20, 2023
0.16.0 Jan 16, 2023
0.15.0 Nov 15, 2022
0.2.0 Nov 5, 2019

#96 in Embedded development

Download history 357/week @ 2023-01-29 279/week @ 2023-02-05 280/week @ 2023-02-12 346/week @ 2023-02-19 245/week @ 2023-02-26 363/week @ 2023-03-05 365/week @ 2023-03-12 577/week @ 2023-03-19 270/week @ 2023-03-26 263/week @ 2023-04-02 450/week @ 2023-04-09 658/week @ 2023-04-16 528/week @ 2023-04-23 690/week @ 2023-04-30 644/week @ 2023-05-07 649/week @ 2023-05-14

2,584 downloads per month
Used in 2 crates

MPL-2.0 license

1MB
17K SLoC

uefi-services

Crates.io Docs.rs

This crate enables you some convenience features on top of the uefi crate. It includes a panic handler, a logger, and a global allocator.

uefi-services is part of the uefi-rs project. Please refer to https://github.com/rust-osdev/uefi-rs/ for comprehensive documentation.

Optional features

This crate's features are described in src/lib.rs.


lib.rs:

This crate simplifies the writing of higher-level code for UEFI.

It initializes the memory allocation and logging crates, allowing code to use Rust's data structures and to log errors.

Logging and allocation are only allowed while boot services are active. Once runtime services are activated by calling exit_boot_services, the logger will be disabled and the allocator will always return null.

It also stores a global reference to the UEFI system table, in order to reduce the redundant passing of references to it.

Library code can simply use global UEFI functions through the reference provided by system_table.

Optional crate features

  • logger (enabled by default): Initialize a global logger.
  • panic_handler (enabled by default): Register a panic handler. A panic handler must be provided for your program to compile, but you can choose to provide your own if you don't want to use this one.
  • qemu: On x86_64, make qemu exit with code 3 if a panic occurs. This feature assumes the program is running under QEMU.

Dependencies

~1.1–1.6MB
~36K SLoC