@@ -95,14 +95,20 @@ format for configuration and the possible configuration values are documented
95
95
#### Option 1: Configuring ` cross ` directly in your ` Cargo.toml `
96
96
97
97
You can directly set [ configuration values] [ config_file ] in your ` Cargo.toml `
98
- file, under the ` [package .metadata.cross] ` table, i.e. key prefix. An example
98
+ file, under the ` [workspace .metadata.cross] ` table, i.e. key prefix. An example
99
99
config snippet would look like this:
100
100
101
101
``` toml,cargo
102
- [package.metadata.cross.target.aarch64-unknown-linux-gnu]
103
- xargo = false
104
- image = "test-image"
105
- runner = "custom-runner"
102
+ [workspace.metadata.cross.target.aarch64-unknown-linux-gnu]
103
+ # Install libssl-dev:arm64, see <https://github.com/cross-rs/cross/blob/main/docs/custom_images.md#adding-dependencies-to-existing-images>
104
+ pre-build = [
105
+ "dpkg --add-architecture $CROSS_DEB_ARCH",
106
+ "apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH"
107
+ ]
108
+ [workspace.metadata.cross.target.armv7-unknown-linux-gnueabi]
109
+ image = "my/image:latest"
110
+ [workspace.metadata.cross.build]
111
+ env.volumes = ["A_DIRECTORY=/path/to/volume"]
106
112
```
107
113
108
114
#### Option 2: Configuring ` cross ` via a ` Cross.toml ` file
@@ -268,17 +274,17 @@ terminate.
268
274
269
275
[ 4] libc = newlib
270
276
271
- [ 5] Must change `image =
272
- "ghcr.io/cross-rs/x86_64-unknown-linux-gnu: main-centos "` in ` Cross.toml`
273
- for ` [target.x86_64-unknown-linux-gnu] ` to use the CentOS7-compatible
274
- target.
277
+ [ 5] Must change
278
+ ` image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos"` in
279
+ ` Cross.toml ` for ` [target.x86_64-unknown-linux-gnu] ` to use the
280
+ CentOS7-compatible target.
275
281
276
282
[ 6] libc = emscripten and GCC = clang
277
283
278
- [ 7] Must change `image =
279
- "ghcr.io/cross-rs/aarch64-unknown-linux-gnu: main-centos "` in ` Cross.toml`
280
- for ` [target.aarch64-unknown-linux-gnu] ` to use the CentOS7-compatible
281
- target.
284
+ [ 7] Must change
285
+ ` image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main-centos"` in
286
+ ` Cross.toml ` for ` [target.aarch64-unknown-linux-gnu] ` to use the
287
+ CentOS7-compatible target.
282
288
283
289
<!-- [7] libc = emscripten and GCC = clang. The Docker images for these targets are currently not built automatically
284
290
due to a [compiler bug](https://github.com/rust-lang/rust/issues/98216), you will have to build them yourself for now.-->
0 commit comments