Skip to content

Discuss Crate Features #560

Closed
Closed
@phip1611

Description

@phip1611

I personally do not like the exts feature. With a name such as alloc feature, it is more clear what one gets. With exts not. Additionally, at the moment, people do not get what they expect from alloc feature. uefi-rs doesn't follow the conventions of the Rust ecosystem.

From a short investigation, we currently use the following features:

  • alloc
    • adds a #[global_allocator] but nothing more
  • exts
    • activates the alloc crate from the standard library distribution
    • activates all functionality that uses allocations

My suggestion is:

  • rename alloc module and feature to global_allocator
    • this also allows us to get rid of the weird alloc_api rename and use alloc everywhere
  • rename feature exts to alloc (as it is the default in the ecosystem, i.e., in other popular crates)
  • update all documentation

Additionally, we should think about whether it makes sense to add a few features with a more meaningful name and let them depend on the new alloc feature. However, at a first glance, this may be overkill at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions