v2023020001.4.0
What's Changed
🚀 Features & ✨ Enhancements
-
Add Rust Module [Rebase \& FF] @makubacki (#300)
Change Details
## Description
Makes some adjustments to allow edk2 Rust-based modules to build
in the repo and adds a hello world Rust DXE module.These are based on the Rust code from @joschock.
Summary of changes:
.pytool/CISettings.py: Set rust-ci scope and use in tree BaseTools
The Rust BaseTool changes are not in the edk2-basetools PIP module,
so this change updates CISettings.py to use the in tree tools by
default.The
rust-ci
scope is added as an active scope so Rust related
plugins likeRustHostUnitTestPlugin
will run.
MsCorePkg: Add RustBootServicesAllocatorDxe
Adds a library crate that implements a global allocator based on
AllocatePool()
. Memory is allocated from the
EFI_BOOT_SERVICES_DATA
pool.
MsCorePkg: Add HelloWorldRustDxe
Adds a simple Rust based DXE driver to demonstrate how to structure
a DXE driver that only has Rust crate dependencies.Within the firmware build framework, this is considered a "pure Rust"
DXE driver in that it only has aCargo.toml
file in the[Sources]
section of the INF with no EDK II library dependencies.The module uses the
RustAdvancedLoggerDxe
crate (which is a wrapper
around the Advanced Logger protocol) to write debug messages and the
RustBootServicesAllocatorDxe
.
- Impacts functionality?
- Functionality - Does the change ultimately impact how firmware functions?
- Examples: Add a new library, publish a new PPI, update an algorithm, ...
- Impacts security?
- Security - Does the change have a direct security impact on an application,
flow, or firmware? - Examples: Crypto algorithm change, buffer overflow fix, parameter
validation improvement, ...
- Security - Does the change have a direct security impact on an application,
- Breaking change?
- Breaking change - Will anyone consuming this change experience a break
in build or boot behavior? - Examples: Add a new library class, move a module to a different repo, call
a function in a new library class in a pre-existing module, ...
- Breaking change - Will anyone consuming this change experience a break
- Includes tests?
- Tests - Does the change include any explicit test code?
- Examples: Unit tests, integration tests, robot tests, ...
- Includes documentation?
- Documentation - Does the change contain explicit documentation additions
outside direct code modifications (and comments)? - Examples: Update readme file, add feature readme file, link to documentation
on an a separate Web page, ...
- Documentation - Does the change contain explicit documentation additions
How This Was Tested
- MsCorePkg CI build
- Boot and test HelloWorldRustDxe on QEMU Q35
Integration Instructions
See Rust Build for more details about building and using Rust modules.
- Impacts functionality?
Full Changelog: v2023020001.3.2...v2023020001.4.0