Skip to content

Commit 5018cf7

Browse files
committed
README: Improve formatting
and limit text to 80 columns. Move a few hyperlinks to the bottom of the file rather than spraying them in between text passages.
1 parent ca69a43 commit 5018cf7

File tree

1 file changed

+16
-27
lines changed

1 file changed

+16
-27
lines changed

README.md

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,13 @@ See our [Getting Started](./docs/getting-started.md) guide for detailed
4040
installation instructions.
4141

4242
- [rustup](https://rustup.rs/)
43-
4443
- A Linux kernel with [binfmt_misc] support is required for cross testing.
4544

46-
[binfmt_misc]: https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
47-
4845
One of these container engines is required. If both are installed, `cross` will
4946
default to `docker`.
5047

5148
- [Docker]. Note that on Linux non-sudo users need to be in the `docker` group or use rootless docker.
52-
Read the container engine [install guide][install] for the required installation and post-installation steps. Requires version 20.10 (API 1.40) or later.
53-
54-
[install]: https://github.com/cross-rs/cross/wiki/Getting-Started#installing-a-container-engine
55-
49+
Read the container engine [install guide][docker_install] for the required installation and post-installation steps. Requires version 20.10 (API 1.40) or later.
5650
- [Podman]. Requires version 3.4.0 or later.
5751

5852
## Installation
@@ -87,7 +81,8 @@ $ cross test --target mips64-unknown-linux-gnuabi64
8781
$ cross rustc --target powerpc-unknown-linux-gnu --release -- -C lto
8882
```
8983

90-
Additional documentation can be found on the [wiki](https://github.com/cross-rs/cross/wiki).
84+
Additional documentation can be found on the
85+
[wiki](https://github.com/cross-rs/cross/wiki) or the `docs/` subfolder.
9186

9287
## Configuration
9388

@@ -141,11 +136,12 @@ $ docker run -v /var/run/docker.sock:/var/run/docker.sock -v .:/project \
141136
The image running `cross` requires the rust development tools to be installed.
142137

143138
With this setup `cross` must find and mount the correct host paths into the
144-
container used for cross compilation. This includes the original project directory as
145-
well as the root path of the parent container to give access to the rust build
146-
tools.
139+
container used for cross compilation. This includes the original project
140+
directory as well as the root path of the parent container to give access to
141+
the rust build tools.
147142

148-
To inform `cross` that it is running inside a container set `CROSS_CONTAINER_IN_CONTAINER=true`.
143+
To inform `cross` that it is running inside a container set
144+
`CROSS_CONTAINER_IN_CONTAINER=true`.
149145

150146
A development or CI container can be created like this:
151147

@@ -180,19 +176,6 @@ environment variable.
180176
For example in case you want use [Podman], you can set `CROSS_CONTAINER_ENGINE=podman`.
181177

182178

183-
### Mounting volumes into the build environment
184-
185-
In addition to passing environment variables, you can also specify environment
186-
variables pointing to paths which should be mounted into the container:
187-
188-
```toml
189-
[target.aarch64-unknown-linux-gnu.env]
190-
volumes = [
191-
"BUILD_DIR",
192-
]
193-
```
194-
195-
196179
## Supported targets
197180

198181
A target is considered as “supported” if `cross` can cross compile a
@@ -294,8 +277,10 @@ terminate.
294277
<!--[7] libc = emscripten and GCC = clang. The Docker images for these targets are currently not built automatically
295278
due to a [compiler bug](https://github.com/rust-lang/rust/issues/98216), you will have to build them yourself for now.-->
296279

297-
Additional Dockerfiles for other targets can be found in [cross-toolchains](https://github.com/cross-rs/cross-toolchains).
298-
These include MSVC and Apple Darwin targets, which we cannot ship pre-built images of.
280+
Additional Dockerfiles for other targets can be found in
281+
[cross-toolchains](https://github.com/cross-rs/cross-toolchains). These include
282+
MSVC and Apple Darwin targets, which we cannot ship pre-built images of.
283+
299284

300285
## Debugging
301286

@@ -353,3 +338,7 @@ to intervene to uphold that code of conduct.
353338
[Docker]: https://www.docker.com
354339
[Podman]: https://podman.io
355340
[Matrix room]: https://matrix.to/#/#cross-rs:matrix.org
341+
[docker_install]: https://github.com/cross-rs/cross/wiki/Getting-Started#installing-a-container-engine
342+
[binfmt_misc]: https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
343+
[config_file]: ./docs/config_file.md
344+
[docs_env_vars]: ./docs/environment_variables.md

0 commit comments

Comments
 (0)