You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Ebrahim Tahernejad 4ab6f1a9bc
XCFramework build for apple (#93)
2 years ago
..
tun2proxy XCFramework build for apple (#93) 2 years ago
tun2proxy.xcodeproj refactor FFI 2 years ago
readme.md refactor FFI 2 years ago

readme.md

Build iOS framework

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

Building iOS framework

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):

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