mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Remove cargo-apk
This commit is contained in:
parent
d478775113
commit
e7e14d014d
4
.github/actions/android/action.yml
vendored
4
.github/actions/android/action.yml
vendored
@ -7,11 +7,11 @@ runs:
|
|||||||
- uses: extractions/setup-just@v1
|
- uses: extractions/setup-just@v1
|
||||||
- name: Install nightly toolchain
|
- name: Install nightly toolchain
|
||||||
shell: bash
|
shell: bash
|
||||||
run: just nightly-toolchain
|
run: just nightly-toolchain-android
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cd android/gradle && ./gradlew assembleDebug
|
run: just build-android
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: maplibre-rs.apk
|
name: maplibre-rs.apk
|
||||||
|
|||||||
@ -10,23 +10,17 @@ cargo run --example desktop --
|
|||||||
|
|
||||||
## Android
|
## Android
|
||||||
|
|
||||||
First you have to install cargo-apk:
|
You should make sure that a recent Android NDK is installed. You will need to set the `ANDROID_NDK_ROOT` variable
|
||||||
|
|
||||||
```bash
|
|
||||||
cargo install cargo-apk
|
|
||||||
```
|
|
||||||
|
|
||||||
Next, you should make sure that a recent Android NDK is installed. You will need to set the `ANDROID_NDK_ROOT` variable
|
|
||||||
to something like this:
|
to something like this:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export ANDROID_NDK_ROOT=$HOME/android-sdk/ndk/23.1.7779620/
|
export ANDROID_NDK_ROOT=$HOME/android-sdk/ndk/23.1.7779620/
|
||||||
```
|
```
|
||||||
|
|
||||||
After that you can run the app on a connected device using:
|
After that you can run the build the library:
|
||||||
|
|
||||||
``bash
|
``bash
|
||||||
cargo apk run --lib
|
just build-android
|
||||||
``
|
``
|
||||||
|
|
||||||
## iOS
|
## iOS
|
||||||
@ -41,8 +35,6 @@ In order to run this app on macOS you have to open the Xcode project at `./apple
|
|||||||
You can then run the app on a macOS. During the Xcode build process cargo is used to build
|
You can then run the app on a macOS. During the Xcode build process cargo is used to build
|
||||||
a static library for the required architecture.
|
a static library for the required architecture.
|
||||||
|
|
||||||
*Hint: Right now only arm64/aarch64 devices are supported*
|
|
||||||
|
|
||||||
## Web (WebGL, WebGPU)
|
## Web (WebGL, WebGPU)
|
||||||
|
|
||||||
If you have a browser which already supports a recent version of the WebGPU specification then you can start a
|
If you have a browser which already supports a recent version of the WebGPU specification then you can start a
|
||||||
|
|||||||
13
justfile
13
justfile
@ -33,6 +33,10 @@ nightly-toolchain:
|
|||||||
rustup component add rust-src --toolchain $NIGHTLY_TOOLCHAIN
|
rustup component add rust-src --toolchain $NIGHTLY_TOOLCHAIN
|
||||||
rustup override set $NIGHTLY_TOOLCHAIN
|
rustup override set $NIGHTLY_TOOLCHAIN
|
||||||
|
|
||||||
|
nightly-toolchain-android: nightly-toolchain
|
||||||
|
rustup target add --toolchain $NIGHTLY_TOOLCHAIN x86_64-linux-android
|
||||||
|
rustup target add --toolchain $NIGHTLY_TOOLCHAIN aarch64-linux-android
|
||||||
|
|
||||||
webpack-webgl-production: nightly-toolchain
|
webpack-webgl-production: nightly-toolchain
|
||||||
cd web/web && npm install && npm run webgl-production-build
|
cd web/web && npm install && npm run webgl-production-build
|
||||||
|
|
||||||
@ -68,14 +72,9 @@ webpack-production: nightly-toolchain
|
|||||||
#profile-bench:
|
#profile-bench:
|
||||||
# cargo flamegraph --bench render -- --bench
|
# cargo flamegraph --bench render -- --bench
|
||||||
|
|
||||||
install-cargo-apk:
|
|
||||||
cargo install cargo-apk
|
|
||||||
|
|
||||||
run-apk: print-android-env nightly-toolchain install-cargo-apk
|
build-android: print-android-env
|
||||||
cargo apk run -p maplibre-android --lib -Zbuild-std
|
cd android/gradle && ./gradlew assembleDebug
|
||||||
|
|
||||||
build-apk: print-android-env nightly-toolchain install-cargo-apk
|
|
||||||
cargo apk build -p maplibre-android --lib -Zbuild-std
|
|
||||||
|
|
||||||
# language=bash
|
# language=bash
|
||||||
print-android-env:
|
print-android-env:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user