-
Notifications
You must be signed in to change notification settings - Fork 390
/
Copy pathcross_toml.md
43 lines (35 loc) · 1.09 KB
/
cross_toml.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
The `cross` configuration in the `Cross.toml` file, can contain the following elements:
# `build`
The `build` key allows you to set global variables, e.g.:
```toml
[build]
xargo = true
default-target = "x86_64-unknown-linux-gnu"
```
# `build.env`
With the `build.env` key you can globally set volumes that should be mounted
in the Docker container or environment variables that should be passed through.
For example:
```toml
[build.env]
volumes = ["VOL1_ARG", "VOL2_ARG"]
passthrough = ["IMPORTANT_ENV_VARIABLES"]
var.ARG1 = "value"
```
# `target.TARGET`
The `target` key allows you to specify parameters for specific compilation targets.
```toml
[target.aarch64-unknown-linux-gnu]
xargo = false
image = "test-image"
runner = "custom-runner"
```
# `target.TARGET.env`
The `target` key allows you to specify environment variables that should be used for a specific compilation target.
This is similar to `build.env`, but allows you to be more specific per target.
```toml
[target.x86_64-unknown-linux-gnu.env]
volumes = ["VOL1_ARG", "VOL2_ARG"]
passthrough = ["IMPORTANT_ENV_VARIABLES"]
var.ARG1 = "value"
```