mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-25 11:22:21 +00:00
change Apple building description
This commit is contained in:
parent
ebbe939f85
commit
18044a8056
6 changed files with 15 additions and 477 deletions
|
@ -1,4 +1,4 @@
|
|||
Build iOS framework
|
||||
Build iOS xcframework
|
||||
----------------
|
||||
|
||||
# Install Rust build tools
|
||||
|
@ -8,14 +8,15 @@ Build iOS framework
|
|||
- Install iOS target support: `rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios`
|
||||
- Install cbindgen tool: `cargo install cbindgen`
|
||||
|
||||
# Building iOS framework
|
||||
# Building iOS xcframework
|
||||
|
||||
Due to an unknown reason at present, compiling Rust code inside Xcode fails, so you have to manually compile it. Please run the following command in zsh (or bash):
|
||||
Run the following command in zsh (or bash):
|
||||
```bash
|
||||
cd tun2proxy
|
||||
|
||||
cargo build --release --target aarch64-apple-ios
|
||||
cargo build --release --target x86_64-apple-ios
|
||||
lipo -create target/aarch64-apple-ios/release/libtun2proxy.a target/x86_64-apple-ios/release/libtun2proxy.a -output target/libtun2proxy.a
|
||||
cbindgen --config cbindgen.toml -l C -o target/tun2proxy-ffi.h
|
||||
./build-apple.sh
|
||||
```
|
||||
|
||||
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue