Skip to content

Default feature specification #13

@ehuss

Description

@ehuss

This issue is for working through the implementation issues for determining the default set of cfg values for the standard library.

Currently the default set is driven by the rust build system, which uses the config.toml file which is configured by various parts of the CI scripts. The build system sets Cargo features (such as here)
to control how the standard library is built.

The build system also sets environment variables (like LLVM_CONFIG for sanitizers), which are picked up by build scripts.

Currently Cargo has no way of knowing which features or environment variables to set. They change per platform, and based on build configuration settings.

Some rough ideas on how to approach this:

  • Hard-code the values in Cargo. The MVP implementation will likely take this route, but it is not a realistic option.
  • Include some configuration file in the source distribution that declares the default features used per platform. This may be difficult to generate.
  • Make the user explicitly declare the features they need.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-needs-designStatus: needs design workfeaturesIssues related to Cargo featuresimplementationImplementation exploration and tracking issuesplan before stabilizationThis needs a plan for how to address before stabilization, but does not need to be implemented.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions