You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,13 @@
4
4
5
5
This version of `cargo-ndk` is much closer to a thin passthrough to `cargo` than previous versions. Please take note of the breaking changes.
6
6
7
-
It also introduces a new command, `cargo ndk-test`. This will push your tests to a device via adb and run them on-device. It currently has
7
+
It introduces a new command, `cargo ndk-test`. This will push your tests to a device via adb and run them on-device. It currently has
8
8
a limitation that doctests can still only be run on the host.
9
9
10
-
**New MSRV: 1.86**
10
+
It also introduces a `cargo ndk-runner` subcommand (which is used by `ndk-test` under the hood) and can be specified as a `runner` in Cargo's `config.toml` to enable `cargo run` to work with Android binaries.
11
+
12
+
> [!IMPORTANT]
13
+
> New MSRV: **1.86**. This means that **to build `cargo-ndk`** you need at least 1.86. You can still build projects targetting older versions of Rust with this release of `cargo-ndk`.
11
14
12
15
-**Breaking change**: Replaced gumdrop CLI parsing with clap. This is functionally equivalent but may cause some minor behavioral differences in edge cases
13
16
-**Breaking change**: No longer strips build output by default, and `--no-strip` option is removed
@@ -16,6 +19,7 @@ a limitation that doctests can still only be run on the host.
16
19
-**Breaking change**: `--bindgen` has been removed, and relevant environment variables are set by default
17
20
- Feature: Clang builtins can now be linked automatically by adding `--link-builtins` or its equivalent environment variable
18
21
- Feature: `cargo ndk-test` for running tests on Android devices.
22
+
- Feature: `cargo ndk-runner` for running binaries on Android devices.
19
23
- Enhancement: Can now be built for an Android host (i.e. Termux) if built with `CARGO_NDK_ON_ANDROID` environment variable set
20
24
- Enhancement: CLI flags can now be used in any order (e.g., `cargo ndk -t x86 build` and `cargo ndk build --target x86` are equivalent).
21
25
- Enhancement: Added environment variable support for configuration flags with `CARGO_NDK_` prefix (e.g., `CARGO_NDK_TARGET`, `CARGO_NDK_PLATFORM`, `CARGO_NDK_OUTPUT_DIR`)
This cargo extension handles all the environment configuration needed for successfully building libraries
8
-
for Android from a Rust codebase, with support for generating the correct `jniLibs` directory structure.
7
+
This cargo extension handles all the environment configuration needed for successfully building libraries or binaries for Android from a Rust codebase, with support for generating the correct `jniLibs` directory structure.
8
+
9
+
`cargo-ndk` provides three subcommands to cargo:
10
+
11
+
-`cargo ndk` — a passthrough for `cargo` applying all the relevant environment variables to ensure a successful build against the NDK
12
+
-`cargo ndk-test` — run tests via `adb` automagically
13
+
-`cargo ndk-env` — generate sh exports, PowerShell env vars or JSON (i.e. for Visual Studio Code) to make `rust-analyzer` happy, or other unspeakable crimes I hope you keep to yourself
14
+
15
+
## Table of Contents
16
+
17
+
-[Installing](#installing)
18
+
-[Examples](#examples)
19
+
-[Building a library for 32-bit and 64-bit ARM systems](#building-a-library-for-32-bit-and-64-bit-arm-systems)
20
+
-[Linking against and copying `libc++_shared.so`](#linking-against-and-copying-libc_sharedso-into-the-relevant-places-in-the-output-directory)
21
+
-[Usage](#usage)
22
+
-[Using `cargo run` binaries via adb](#using-cargo-run-binaries-via-adb)
23
+
-[Running your tests on an Android device](#running-your-tests-on-an-android-device)
0 commit comments