1 stable release
new 5.1.5 | Jan 14, 2025 |
---|
#215 in Hardware support
8MB
3.5K
SLoC
Mu Rust Platform Initialization (PI)
Platform Initialization (PI) Specification definitions and support code in rust.
This repository is part of Project Mu.
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
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 opencode@microsoft.com. with any additional questions or comments.
Copyright & License
- Copyright (c) Microsoft Corporation
- SPDX-License-Identifier: BSD-2-Clause-Patent