![]() ![]() Lipo -info libpact_mock_server.a Extract one of the architectures from a fat library using the lipo command: lipo libfoo.a -thin arm64 -output libfoo-arm64.a target/arm64-apple-darwin/release/libpact_mock_server.a /path/to/PactSwift/Resources/macOS-arm64/lipact_mock_server.a MacOS arm64 cargo build -target=aarch64-apple-darwin -releaseĬp. target/x86_64-apple-darwin/release/libpact_mock_server.a /path/to/PactSwift/Resources/macOS-x86_64/lipact_mock_server.a MacOS x86_64 cargo build -targget=x86_64-apple-darwin -releaseĬp. target/arm64-apple-ios-sim/release/libpact_mock_server.a /path/to/PactSwift/Resources/arm64iOSsim/libpact_mock_server.a IOS Simulator arm64 cargo +nightly build -Z build-std -target aarch64-apple-ios-sim -releaseĬp. target/x86_64-apple-ios/release/libpact_mock_server.a /path/to/PactSwift/Resources/iOS/lipact_mock_server.a IOS Simulator x86_64 cargo build -target=x86_64-apple-ios -releaseĬp. target/universal/release/libpact_mock_server.a /path/to/PactSwift/Resources/iOS/lipact_mock_server.a Build binaries Universal iOS (arm64 mobile device + x86_64 simulator) cargo lipo -releaseĬp. PactSwift/Sources/Headers/pact_mock_server.hĭefine the type of binary cd pact-reference/rust/pact_mock_server_ffi Generate the header file cd pact-reference/rust/pact_mock_server_ffiĬbindgen src/lib.rs -l c > pact_mock_server.hĬp pact_mock_server.h. More: Install more tools to help with the buildĬargo-lipo - a tool for building universal iOS binaries,Ĭbindgen - a tool for generating C headers from rust cargo install cargo-lipo Rustup component add rust-src -toolchain nightly-x86_64-apple-darwin # While arm64-apple-ios-sim is still in Tier 3: Dealing with Rust to build PactSwiftMockServerĮxample of an automated script that does most of this: Install RustĬurl -sSf | sh List available architecture targets rustup target listĪdd arch targets rustup target add aarch64-apple-ios aarch64-apple-darwin x86_64-apple-ios x86_64-apple-darwin ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |