Skip to content

Commit ca69a43

Browse files
committed
README: Extend cross configuration section
and explicitly point towards environment-variable based configuration which was previously missing. This should make that part of the documentation easier to find.
1 parent c2bef62 commit ca69a43

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,17 @@ Additional documentation can be found on the [wiki](https://github.com/cross-rs/
9191

9292
## Configuration
9393

94-
You have three options to configure `cross`. All of these options use the TOML format for configuration and the possible configuration values are documented [here](docs/cross_toml.md).
94+
### Configuring cross behavior
9595

96-
### Option 1: Configuring `cross` directly in your `Cargo.toml`
96+
You have four options to configure `cross`. All of these options use the TOML
97+
format for configuration and the possible configuration values are documented
98+
[here][config_file].
9799

98-
You can directly set [configuration values](docs/cross_toml.md) in your `Cargo.toml` file, under the `[package.metadata.cross]` table, i.e. key prefix.
99-
An example config snippet would look like this:
100+
#### Option 1: Configuring `cross` directly in your `Cargo.toml`
101+
102+
You can directly set [configuration values][config_file] in your `Cargo.toml`
103+
file, under the `[package.metadata.cross]` table, i.e. key prefix. An example
104+
config snippet would look like this:
100105

101106
```toml,cargo
102107
[package.metadata.cross.target.aarch64-unknown-linux-gnu]
@@ -105,17 +110,21 @@ image = "test-image"
105110
runner = "custom-runner"
106111
```
107112

108-
### Option 2: Configuring `cross` via a `Cross.toml` file
109-
110-
You can put your [configuration](docs/cross_toml.md) inside a `Cross.toml` file in your project root directory.
111-
112-
### Option 3: Using `CROSS_CONFIG` to specify the location of your configuration
113+
#### Option 2: Configuring `cross` via a `Cross.toml` file
113114

114-
By setting the `CROSS_CONFIG` environment variable, you can tell `cross` where it should search for the config file. This way you are not limited to a `Cross.toml` file in the project root.
115+
You can put your [configuration][config_file] inside a `Cross.toml` file
116+
in your project root directory.
115117

118+
#### Option 3: Using `CROSS_CONFIG` to specify the location of your configuration
116119

120+
By setting the `CROSS_CONFIG` environment variable, you can tell `cross` where
121+
it should search for the config file. This way you are not limited to a
122+
`Cross.toml` file in the project root.
117123

124+
#### Option 4: Configuring `cross` through environment variables
118125

126+
Besides the TOML-based configuration files, config can be passed through
127+
[environment variables][docs_env_vars], too.
119128

120129

121130
### Docker in Docker

0 commit comments

Comments
 (0)