Skip to content

get configuration from the environment #147

@japaric

Description

@japaric

Today Cross can be configured via the Cross.toml file. However, we would also like to be able to specify this configuration via environment variables.

What to do

  • Each configuration entry allowed in Cross.toml should be overrided by a corresponding environment variable, if set. If the configuration entry is named build.env.passthrough then its environment variable counterpart will be named CROSS_BUILD_ENV_PASSTHROUGH. If the configuration entry takes a list of strings as value then the env variable value will be parsed as a list of space separated strings.

References

  • The Cross.toml parsing logic is in src/main.rs, in the impl Toml block.
  • Cargo has a similar behavior. You'll probably be able to borrow some logic from there.

Required for japaric/trust#73

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions