Skip to content

Commit

Permalink
Fix documentation issues
Browse files Browse the repository at this point in the history
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

Signed-off-by: Sascha Grunert <[email protected]>
  • Loading branch information
saschagrunert committed Sep 6, 2022
1 parent 47df5c7 commit 7d43724
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ default to `docker`.
cargo install cross --git https://github.com/cross-rs/cross
```

It's also possible to directly download the pre-compiled [release
binaries](https://github.com/cross-rs/cross/releases) or using
[cargo-binstall](https://github.com/cargo-bins/cargo-binstall).

## Usage

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

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

Expand Down
1 change: 1 addition & 0 deletions docs/cross_toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The `build` key allows you to set global variables, e.g.:
xargo = true
build-std = true
default-target = "x86_64-unknown-linux-gnu"
pre-build = ["apt-get update"] # can also be the path to a file to run
```

# `build.env`
Expand Down

0 comments on commit 7d43724

Please sign in to comment.