Skip to content

Build the standard library with different cargo features #4

Open
@ehuss

Description

@ehuss

This is a "use case" issue to try to clarify and discuss a use case, and how it will be addressed.

There has been some interest in being able to pass different cargo feature flags to the standard library to change it some way; either to change the implementation, or to disable sections of the library.

This is unlikely to be possible with Cargo's current features system. There are some problems with backwards-compatibility, and generally the level of commitment to stabilize a feature flag would likely be extremely high.

Please leave a comment if you have any specific use cases to consider. Some that have come up in the past:

  • The RFC 2663 proposal had a suggestion of force-tiny-fmt to use a different algorithm for fmt.
  • std already has a number of cargo features (panic, backtrace, profiler, etc.).
    • Removing things like backtrace can maybe be helpful in reducing binary size?

This issue is to explore possible features, how they can be expressed from Cargo, and whether or not it is feasible to accomplish in a stable way.

This is partially related to #8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    use caseDiscussion on a high-level use case

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions