Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rust support and DXE Rust driver to boot [Rebase & FF] #688

Merged
merged 3 commits into from
Aug 30, 2023

Conversation

makubacki
Copy link
Member

Description

Includes changes to add Rust build support to the repo, include a Rust
DXE driver (HelloWorldRustDxe) in the QemuQ35Pkg and QemuSbsaPkg
build and boot, and associated pipeline changes.

Change summary:


Add repo Rust infrastructure support

Adds files to support:

  • A cargo-make makefile
  • Default Rust toolchain version
  • Rust formatting configuration
  • Rust host-based unit test CI execution

Bump Common/MU from 2023020001.3.1 to 2023020001.4.0


Add HelloWorldRustDxe to QemuQ35Pkg and QemuSbsaPkg

Adds the driver to both packages to demonstrate a Rust based UEFI
DXE driver executing during boot on a X64 and AARCH64 system.

A workspace Cargo.toml file is added for cargo make. Since this repo
is the "leaf of a dependency chain" in that it builds binaries that
are integrated into the platform build, the Cargo.lock file is
checked in per the guidance in:
https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries


.azurepipelines: Add Rust support

Updates the repo pipelines to support Rust builds.


  • 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, ...
  • 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, ...
  • 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, ...

How This Was Tested

  • Verified CI and Platform builds locally and in CI
  • Verified QemuQ35Pkg and QemuSbsaPkg builds
  • Verified HelloWorldRustDxe dispatches during boot and prints
    the expected debug messages

Integration Instructions

N/A


Note: The MU_BASECORE submodule will be updated after microsoft/mu_basecore#545 completes.

@makubacki makubacki added the type:feature-request A new feature proposal label Aug 30, 2023
@makubacki makubacki self-assigned this Aug 30, 2023
Cargo.lock Show resolved Hide resolved
@makubacki
Copy link
Member Author

Currently waiting on #689 so the mu_basecore submodule can be updated (the change needed for this PR in mu_basecore is after the UefiCpuLib breaking change).

Adds files to support:

- A cargo-make makefile
- Default Rust toolchain version
- Rust formatting configuration
- Rust host-based unit test CI execution

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Adds the driver to both packages to demonstrate a Rust based UEFI
DXE driver executing during boot on a X64 and AARCH64 system.

A workspace Cargo.toml file is added for cargo make. Since this repo
is the "leaf of a dependency chain" in that it builds binaries that
are integrated into the platform build, the `Cargo.lock` file is
checked in per the guidance in:
https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Updates the repo pipelines to support Rust builds.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
@makubacki makubacki merged commit 8ad0ec3 into main Aug 30, 2023
25 checks passed
@makubacki makubacki deleted the add_rust_support_and_driver branch August 30, 2023 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature-request A new feature proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants