2 releases (1 stable)

1.0.0 Dec 2, 2022
0.1.0 Nov 28, 2022

#214 in Memory management

Download history 9708/week @ 2024-06-15 9664/week @ 2024-06-22 9385/week @ 2024-06-29 9413/week @ 2024-07-06 9582/week @ 2024-07-13 9863/week @ 2024-07-20 9188/week @ 2024-07-27 10025/week @ 2024-08-03 9560/week @ 2024-08-10 9003/week @ 2024-08-17 9428/week @ 2024-08-24 9300/week @ 2024-08-31 9553/week @ 2024-09-07 9033/week @ 2024-09-14 10524/week @ 2024-09-21 8878/week @ 2024-09-28

39,379 downloads per month

MIT OR Apache-2.0 OR LGPL-2.1-or-later

32KB
222 lines

r-efi-alloc

UEFI Memory Allocator Integration

The r-efi-alloc project integrates the UEFI memory allocator routines with the rust standard library allocation hooks. This allows using the alloc standard library of rust on UEFI systems.

Project

Requirements

The requirements for this project are:

  • rustc >= 1.62.0
  • r-efi >= 4.0.0

Build

To build this project, run:

cargo build

Available configuration options are:

  • allocator_api: Provide integration with the experimental upstream rust allocators (tracked with the allocator_api feature).

  • examples: This feature-selector enables compilation of examples. This is disabled by default, since they will only compile successfully on UEFI targets.

No special requirements exist to compile for UEFI targets. Native compilations work out of the box without any adjustments. For cross-compilations, either use the toolchains distributed through rustup, build your own toolchains, or use -Zbuild-std as shown below.

If you do not use the official toolchains, you will likely need a nightly rust compiler with the rust-src component enabled:

rustup toolchain install nightly
# OR
rustup update

rustup component add --toolchain nightly rust-src

Be sure to update all components to the most recent version.

Build via: cargo/rustc nightly with -Zbuild-std
cargo +nightly build \
    -Zbuild-std=core,compiler_builtins,alloc \
    -Zbuild-std-features=compiler-builtins-mem \
    --target x86_64-unknown-uefi \
    --features examples \
    --examples

Repository:

License:

  • MIT OR Apache-2.0 OR LGPL-2.1-or-later
  • See AUTHORS file for details.

Dependencies

~255–460KB
~11K SLoC