diff --git a/CHANGELOG.md b/CHANGELOG.md index d374262b..5d528766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## [Unreleased] +## [v0.0.23-alpha] - 2023-8-7 +- add mac universal binary (arm64 + x86_64) + ## [v0.0.22-alpha] - 2023-7-26 - fix Array in abi json encoding ## [v0.0.21-alpha] - 2023-6-12 diff --git a/Cargo.lock b/Cargo.lock index ead125a1..14440afd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3573,7 +3573,7 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "play-cpp-sdk" -version = "0.0.22-alpha" +version = "0.0.23-alpha" dependencies = [ "defi-wallet-core-cpp", "extra-cpp-bindings", diff --git a/Makefile b/Makefile index 6fec5286..39c41e95 100644 --- a/Makefile +++ b/Makefile @@ -54,13 +54,13 @@ clone: build_play-cpp-sdk: clone ifeq ($(shell uname -m), x86_64) ifeq ($(UNAME), Darwin) - ifeq ($(USE_ARM64),true) + cargo install cargo-lipo rustup target add aarch64-apple-darwin - MACOSX_DEPLOYMENT_TARGET=10.15 CXX=$(CXX) CXXFLAGS=$(CXXFLAGS) cargo build --package play-cpp-sdk --release --target aarch64-apple-darwin - else rustup target add x86_64-apple-darwin - MACOSX_DEPLOYMENT_TARGET=10.15 CXX=$(CXX) CXXFLAGS=$(CXXFLAGS) cargo build --package play-cpp-sdk --release - endif + MACOSX_DEPLOYMENT_TARGET=10.15 CXX=$(CXX) CXXFLAGS=$(CXXFLAGS) cargo build --package play-cpp-sdk --release --target aarch64-apple-darwin + MACOSX_DEPLOYMENT_TARGET=10.15 CXX=$(CXX) CXXFLAGS=$(CXXFLAGS) cargo build --package play-cpp-sdk --release + lipo -create -output ./target/release/libplay_cpp_sdk_universal.a ./target/release/libplay_cpp_sdk.a ./target/aarch64-apple-darwin/release/libplay_cpp_sdk.a + lipo -create -output ./target/aarch64-apple-darwin/release/libplay_cpp_sdk_universal.a ./target/release/libplay_cpp_sdk.a ./target/aarch64-apple-darwin/release/libplay_cpp_sdk.a endif ifeq ($(UNAME), Linux) CXX=$(CXX) CXXFLAGS=$(CXXFLAGS) cargo build --package play-cpp-sdk --release @@ -68,13 +68,13 @@ ifeq ($(shell uname -m), x86_64) else ifeq ($(shell uname -m), arm64) ifeq ($(UNAME), Darwin) - ifeq ($(USE_ARM64), true) + cargo install cargo-lipo rustup target add aarch64-apple-darwin - MACOSX_DEPLOYMENT_TARGET=10.15 CXX=$(CXX) CXXFLAGS=$(CXXFLAGS) cargo build --package play-cpp-sdk --release - else rustup target add x86_64-apple-darwin + MACOSX_DEPLOYMENT_TARGET=10.15 CXX=$(CXX) CXXFLAGS=$(CXXFLAGS) cargo build --package play-cpp-sdk --release MACOSX_DEPLOYMENT_TARGET=10.15 CXX=$(CXX) CXXFLAGS=$(CXXFLAGS) cargo build --package play-cpp-sdk --release --target x86_64-apple-darwin - endif + lipo -create -output ./target/release/libplay_cpp_sdk_universal.a ./target/release/libplay_cpp_sdk.a ./target/x86_64-apple-darwin/release/libplay_cpp_sdk.a + lipo -create -output ./target/x86_64-apple-darwin/release/libplay_cpp_sdk_universal.a ./target/release/libplay_cpp_sdk.a ./target/x86_64-apple-darwin/release/libplay_cpp_sdk.a endif else CXX=$(CXX) CXXFLAGS=$(CXXFLAGS) cargo build --package play-cpp-sdk --release diff --git a/play-cpp-sdk/Cargo.toml b/play-cpp-sdk/Cargo.toml index 150b2332..6c1d4857 100644 --- a/play-cpp-sdk/Cargo.toml +++ b/play-cpp-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "play-cpp-sdk" -version = "0.0.22-alpha" +version = "0.0.23-alpha" edition = "2021" license = "Apache-2.0"