Crates.io | r-efi-alloc |
lib.rs | r-efi-alloc |
version | 1.0.0 |
source | src |
created_at | 2022-11-28 11:21:06.026675 |
updated_at | 2022-12-02 14:55:59.130073 |
description | UEFI Memory Allocator Integration |
homepage | https://github.com/r-efi/r-efi/wiki |
repository | https://github.com/r-efi/r-efi-alloc |
max_upload_size | |
id | 724364 |
size | 40,267 |
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.
The requirements for this project are:
rustc >= 1.62.0
r-efi >= 4.0.0
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.
cargo +nightly build \
-Zbuild-std=core,compiler_builtins,alloc \
-Zbuild-std-features=compiler-builtins-mem \
--target x86_64-unknown-uefi \
--features examples \
--examples
https://github.com/r-efi/r-efi-alloc.git
git@github.com:r-efi/r-efi-alloc.git