Skip to content

Commit ebb917d

Browse files
Merge #1011
1011: Fix documentation issues r=Emilgardis,Alexhuszagh a=saschagrunert I came across this project and found possible enhancements to the documentation: - mention that the release binaries can be used directly - added the `pre-build` to Cross.toml `build` section, which also works for all targets - fixed the architecture in the arm64 example in README.md Co-authored-by: Sascha Grunert <sgrunert@redhat.com>
2 parents 47df5c7 + 7d43724 commit ebb917d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ default to `docker`.
5858
cargo install cross --git https://github.com/cross-rs/cross
5959
```
6060

61+
It's also possible to directly download the pre-compiled [release
62+
binaries](https://github.com/cross-rs/cross/releases) or using
63+
[cargo-binstall](https://github.com/cargo-bins/cargo-binstall).
64+
6165
## Usage
6266

6367
`cross` has the exact same CLI as [Cargo](https://github.com/rust-lang/cargo)
@@ -169,7 +173,7 @@ RUN ...
169173
This action will be added to the used image, so it won't be ran/built every time you use `cross`.
170174

171175
```toml
172-
[target.x86_64-unknown-linux-gnu]
176+
[target.aarch64-unknown-linux-gnu]
173177
pre-build = ["dpkg --add-architecture arm64 && apt-get update && apt-get install --assume-yes libfoo:arm64"]
174178
```
175179

docs/cross_toml.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The `build` key allows you to set global variables, e.g.:
1111
xargo = true
1212
build-std = true
1313
default-target = "x86_64-unknown-linux-gnu"
14+
pre-build = ["apt-get update"] # can also be the path to a file to run
1415
```
1516

1617
# `build.env`

0 commit comments

Comments
 (0)