diff options
author | Felix Obenhuber <flxo@users.noreply.github.com> | 2024-04-02 11:39:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-02 17:39:24 +0800 |
commit | 9354683481ff3c1a874d25f2a4082f14ec253698 (patch) | |
tree | f4fd5dcaaf39ca7c4b9d8bb114d8459208435cbe /README.md | |
parent | 6ef2d569b531faf0c0b9dce2f3b0588ca6645e47 (diff) |
Enable Android build (#384)
* Support build for target_os android
The target_os `android` is quite similar to `linux` but must be
mentioned in the guards explicitly. Tested for target
`aarch64-linux-android`.
* Add target aarch64-linux-android to ci
Use `cross` for building target `aarch64-linux-android`. In the `ci`
workflow the matrix branch of `os` `ubuntu-latest` is used because the
matrix organization is host os centric instead of target.
Releases are build with `cross` for target `aarch64-linux-android`.
Install `cross` if needed for a run. At the time of writing the latest
release of `cross` can't build binaries for target
`aarch64-linux-android` and it's common sense that the latest git tag or
`master` shall be used [1].
[1] https://github.com/cross-rs/cross/issues/1222
* Add android related readme section
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -56,7 +56,7 @@ For more details, see [The Future of Bandwhich #275](https://github.com/imsnif/b ### Download a prebuilt binary -If you're on linux, you can download the generic binary from the releases. +If you're on `android` or `linux`, you can download the generic binary from the [releases](https://github.com/imsnif/bandwhich/releases) ### Arch Linux @@ -123,6 +123,19 @@ The minimum supported Rust version is **1.70.0**. cargo install bandwhich ``` +#### Building from source for Android (`aarch64-linux-android`) + +Building for target `aarch64-linux-android` is supported via [cross](https://github.com/cross-rs/cross). Until [#1222](https://github.com/cross-rs/cross/issues/1222) is solved, use the latest HEAD: + +```sh +cargo install --git https://github.com/cross-rs/cross.git cross +cross build --release --target aarch64-linux-android +``` + +Kindly be aware that this process generates a pure binary file and not an APK suitable for installation on any arbitrary Android device. + +The Android support for bandwhich beyond its build is *not* endorsed by this project and may be unstable or non-functional. + ### OpenWRT To install `bandwhich` on OpenWRT, you'll need to compile a binary that would fit its processor architecture. This might mean you would have to cross compile if, for example, you're working on an `x86_64` and the OpenWRT is installed on an `arm7`. |