@@ -95,14 +95,20 @@ format for configuration and the possible configuration values are documented
9595#### Option 1: Configuring ` cross ` directly in your ` Cargo.toml `
9696
9797You 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
9999config snippet would look like this:
100100
101101``` 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"]
106112```
107113
108114#### Option 2: Configuring ` cross ` via a ` Cross.toml ` file
@@ -268,17 +274,17 @@ terminate.
268274
269275[ 4] libc = newlib
270276
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.
275281
276282[ 6] libc = emscripten and GCC = clang
277283
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.
282288
283289<!-- [7] libc = emscripten and GCC = clang. The Docker images for these targets are currently not built automatically
284290due to a [compiler bug](https://github.com/rust-lang/rust/issues/98216), you will have to build them yourself for now.-->
0 commit comments