Skip to content

liqiqiii/mu_rust_helpers

 
 

Repository files navigation

Mu Rust Helpers

Project Mu Rust UEFI helper code.

Most Project Mu Rust repos contain an individual feature. This repo contains code that provides helper functionality for UEFI Rust code. The repo is composed of separate crates for different purposes. Therefore, the code maintained in this repo may overall be less cohesive than other repos.

Requirements

  • rustc >= 1.68.0

Build

cargo build

Build with Official Toolchains

These instructions are derived from those in r-efi.

Starting with rust-version 1.68, rustup distributes pre-compiled toolchains for many UEFI targets. You can enumerate and install them via rustup. This example shows how to enumerate all available targets for your stable toolchain and then install the UEFI target for the x86_64 architecture:

rustup target list --toolchain=stable
rustup target add --toolchain=stable x86_64-unknown-uefi

This project can then be compiled directly for the selected target:

cargo +stable build --lib --target x86_64-unknown-uefi

Build via Foreign Targets

The project can be built for non-UEFI targets via the standard rust toolchains. This allows non-UEFI targets to interact with UEFI systems or otherwise host UEFI operations. Furthermore, this allows running the foreign test-suite of this project as long as the target supports the full standard library:

cargo +stable build --all-targets
cargo +stable test --all-targets

Test

cargo test

Contributing

Contributions are always welcome and encouraged!

Please run the following commands before creating a pull request:

  • >cargo fmt
  • >cargo test --all
    • Verify tests pass.
  • >cargo doc --open
    • Verify documentation appearance.

Guidance and requirements:

Issues

Please open any issues in the issues section.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct.

For more information see the Code of Conduct FAQ or contact [email protected]. with any additional questions or comments.

Copyright & License

  • Copyright (c) Microsoft Corporation
  • SPDX-License-Identifier: BSD-2-Clause-Patent

About

Mu Rust Helper Code

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%