summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorKalle Lindström <karl.lindstrom@mullvad.net>2025-02-06 14:30:38 +0100
committerKalle Lindström <karl.lindstrom@mullvad.net>2025-02-18 15:40:07 +0100
commit802570a5521d41ec9a90dae28977386a5d6cc7f9 (patch)
tree692ec6b53f78d6268c7fdb13e5f9162684511bbf /android
parent36e03e11c921f5c0d49c94d7fe2f272e7dafa553 (diff)
downloadmullvadvpn-802570a5521d41ec9a90dae28977386a5d6cc7f9.tar.xz
mullvadvpn-802570a5521d41ec9a90dae28977386a5d6cc7f9.zip
Add `setup-rust` script and git hook
The `setup-rust` helper script uses Rustup to install the default targets and components that each platform needs. The `setup-rust-post-checkout` script is a git hook (which needs to be copied to .git/hooks/post-checkout, which can be done manually or by running `setup-rust install-hook`) that detects when the `rust-toolchain.toml` file has changed and installs the default targets/components for the platform that the user has specified via the MULLVAD_SETUP_PLATFORM env variable.
Diffstat (limited to 'android')
-rw-r--r--android/BuildInstructions.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/android/BuildInstructions.md b/android/BuildInstructions.md
index 5755737df8..0c7b40907f 100644
--- a/android/BuildInstructions.md
+++ b/android/BuildInstructions.md
@@ -151,7 +151,13 @@ environment variables:
- Install Android targets
```bash
- rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
+ ./scripts/setup-rust android
+ ```
+
+- (Optional) Run the following to install a git `post-checkout` hook that will automatically
+ run the `setup-rust` script when the Rust version specified in the `rust-toolchain.toml` file changes:
+ ```bash
+ .scripts/setup-rust install-hook
```
#### 6. Download wireguard-go-rs submodule