tun2proxy/apple/readme.md

23 lines
746 B
Markdown
Raw Normal View History

2024-04-08 13:45:42 +08:00
Build iOS xcframework
2024-02-01 19:15:32 +08:00
----------------
# Install Rust build tools
- Install Xcode Command Line Tools: `xcode-select --install`
- Install Rust programming language: `curl https://sh.rustup.rs -sSf | sh`
- Install iOS target support: `rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios`
- Install cbindgen tool: `cargo install cbindgen`
2024-04-08 13:45:42 +08:00
# Building iOS xcframework
2024-02-01 19:15:32 +08:00
2024-04-08 13:45:42 +08:00
Run the following command in zsh (or bash):
2024-02-01 19:15:32 +08:00
```bash
cd tun2proxy
2024-04-08 13:45:42 +08:00
./build-apple.sh
2024-02-01 19:15:32 +08:00
```
2024-04-08 13:45:42 +08:00
The script `build-apple.sh` will build the iOS/macOS xcframework and output it to `./tun2proxy.xcframework`
To save the build time, you can use the `build-aarch64-apple-ios-debug.sh` or `build-aarch64-apple-ios.sh` script
to build the `aarch64-apple-ios` target only.