Skip to content

Expose platform-dependent low-level implementations as separate crates #13

@MOZGIII

Description

@MOZGIII

As a way for the future improvements, I'd love to have access to low-level implementation details, for the cases where I have to perform low-level operations.

I'd propose the following structure:

/
/efivar              <- limited high-level interface unifiying/abstracting all the low-level interfaces
/efivar-winapi       <- winapi implementation (windows)
/efivar-efivarfs     <- efivarfs implementation (linux)
/efivar-efivar       <- efivar implementation (linux)
/efivar-nvram        <- nvram implementation (macOS)

All the low-level crates should provide the interface that makes the most sense for a particular implementation. For example, windows implementation would just provide rust-safe wrappers for read var and write var operations, without any boilterplate like VarManager etc. To be more specifc, for write variable functionality only a thin rust-safety wrapper around SetFirmwareEnvironmentVariableExW would be required.

For the high-level efivar the idea of the interface would be the same, but the internal implementation would utilize other crates with the low-level implementations and wrap them up for the unified API.

This would be useful to build up a more feature-full rust crates ecosystem for working with efi variables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions