Skip to content

v2023020003.0.1

Compare
Choose a tag to compare
@github-actions github-actions released this 31 Oct 15:32
· 86 commits to refs/heads/release/202302 since this release
0033f8e

What's Changed

πŸš€ Features & πŸ“– Documentation Updates

  • Add HiiKeyboardLayout crate to support UEFI HII Keyboard Layouts @joschock (#342)
    Change Details
    Β  ## Description

    This crate provides a rust wrapper around UEFI HII Keyboard Layout structures. The relevant structures defined in the UEFI spec are not well-suited for direct definition in rust; so this crate defines analogous rust structures and provides serialization/deserialization support for converting the rust structures into byte buffers and vice versa. This crate uses the scroll crate (https://github.com/m4b/scroll) to facilitate serialization/deserialization of the Hii structures.

    Examples and Usage

    Retrieving a default (en-US) layout, writing it to a buffer, and then reading the buffer back into a rust structure:

     use hii_keyboard_layout::{get_default_keyboard_pkg, HiiKeyboardPkg};
     use scroll::{Pread, Pwrite};
     let mut buffer = [0u8; 4096];
    
     let package = get_default_keyboard_pkg();
     buffer.pwrite(&package, 0).unwrap();
    
     let package2: HiiKeyboardPkg = buffer.pread(0).unwrap();
     assert_eq!(package, package2);
    • Impacts functionality?
      • Introduces a new crate providing support for HII layouts.
    • Impacts security?
    • Breaking change?
    • Includes tests?
      • Includes standard rust unit tests.
    • Includes documentation?
      • Includes standard rust documentation.

    How This Was Tested

    Verified by included unit tests.

    Integration Instructions

    This crate requires the "scroll," "num-traits" and "num-drive" crates, so platforms intending to use it will need to add these as dependencies in their workspace Cargo.toml files. This PR does this for the workspace Cargo.toml that is at the root of mu_plus.

    Sample:

    scroll = { version = "0.11", default-features = false, features = ["derive"]}
    num-traits = { version = "0.2", default-features = false}
    num-derive = { version = "0.4", default-features = false}

Full Changelog: v2023020003.0.0...v2023020003.0.1