mu_rust_helpers 2.0.0

Helper functions for UEFI Rust applications
Documentation
# Mu Rust Helpers


[Project Mu](https://microsoft.github.io/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.

## Current State


This repository is in the early stages of development. The crate is not complete and should not be used in production
at this time. Major changes to the API may occur. We are interested in feedback and contributions and we want the
flexibility to make changes as needed.

## Requirements


![rustc Version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2Fmu_rust_helpers%2Frefs%2Fheads%2Fmain%2Frust-toolchain.toml&query=%24.toolchain.channel&style=for-the-badge&logo=rust&logoColor=FFC832&label=rustc%20version&color=0B7261)

## Build


```sh
cargo build
```

### Build with Official Toolchains


These instructions are derived from those in [r-efi](https://github.com/r-efi/r-efi/blob/main/README.md).

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:

```sh
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:

```sh
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:

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

## Test


```sh
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:

- [Contribution Guidance]https://microsoft.github.io/mu/How/contributing/.
- [Code Requirements]https://microsoft.github.io/mu/CodeDevelopment/requirements/
- [Doc Requirements]https://microsoft.github.io/mu/CodeDevelopment/rust_documentation_conventions/

## Issues


Please open any issues in the [issues section](https://github.com/microsoft/mu_rust_helperss/issues).

## Code of Conduct


This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).

For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com). with any additional questions or comments.

## Copyright & License


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