> For the complete documentation index, see [llms.txt](https://ujhhgtgteams.gitbook.io/wekit-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ujhhgtgteams.gitbook.io/wekit-docs/development.md).

# 开发指南

## 1. 克隆仓库

```bash
git clone https://github.com/Ujhhgtg/WeKit.git --recursive
```

## 2. 安装系统依赖

### A. Arch Linux

```bash
# 确保已在 /etc/pacman.conf 中启用 multilib 软件源
yay -Syu lib32-glibc rustup
rustup toolchain install stable
rustup default stable
rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi i686-linux-android
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "ndk;$(grep '^ndk' ./gradle/libs.versions.toml | sed 's/.*= "\(.*\)"/\1/')"
```

### B. Debian 系

```bash
sudo apt update -y && sudo apt full-upgrade -y
sudo apt install gcc-multilib rustup
rustup toolchain install stable
rustup default stable
rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi i686-linux-android
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "ndk;$(grep '^ndk' ./gradle/libs.versions.toml | sed 's/.*= "\(.*\)"/\1/')"
```

### C. Windows

没试过, 不提供支持, 自行解决, 解决不了的话去用 Linux 或者 WSL

## 3. 构建

构建期间会自动编译 Rust 原生库, 无须手动编译

```bash
chmod +x ./gradlew
./gradlew :app:assembleRelease
```

## 4. 安装

```bash
adb install ./app/build/outputs/apk/release/app-arm64-v8a-release.apk
# --- 或 ---
./gradlew :app:installRelease

# 可选: 应用基准配置 (Baseline Profile)
adb shell cmd package compile -m speed-profile dev.ujhhgtg.wekit
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ujhhgtgteams.gitbook.io/wekit-docs/development.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
