Skip to content

Add UEFI APIs in std::os::uefi #87

Closed
@Ayush1325

Description

Proposal

Problem statement

Hello everyone. I have been working on adding Rust std support for UEFI as a part of Google Summer of Code 2022.

This is a proposal to add some UEFI-specific APIs under std::os::uefi. It is related to PR.

Motivation, use-cases

In the UEFI environment, most of the services/functionality is accessed using System Table, which is passed to the application at its entry. These APIs basically add ways to access the System Table and some of its most common members.

APIs to add

APIs I propose to add under std::os::uefi::env:

  1. pub fn get_system_table() -> NonNull<c_void>
  2. pub fn get_system_handle() -> NonNull<c_void>
  3. pub fn init_globals(handle: NonNull<c_void>, system_table: NonNull<c_void>)

APIs I propose to add under std::os::uefi::ffi (Just re-export std::os::windows::ffi)

  1. trait OsStrExt
  2. trait OsStringExt

Links and related work

  1. PR
  2. My Blog
  3. Tracking Issue

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    ACP-acceptedAPI Change Proposal is accepted (seconded with no objections)T-libs-apiapi-change-proposalA proposal to add or alter unstable APIs in the standard libraries

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions