Skip to content

Commit

Permalink
build: very ugly hack to address ios inability to build dynamic libs …
Browse files Browse the repository at this point in the history
  • Loading branch information
Slesarew committed May 5, 2021
1 parent 97d9189 commit f301f73
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
42 changes: 42 additions & 0 deletions rust/signer/android-hack/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[package]
name = "signer"
version = "0.1.0"
authors = ["debris <[email protected]>"]
edition = "2018"

[dependencies]
base58 = "0.1.0"
base64 = "0.10.1"
blake2-rfc = "0.2.18"
blockies = "0.3"
ethsign = { version = "0.7.3", default-features = false, features = ["pure-rust"] }
jni = { version = "0.16.0", optional = true }
lazy_static = "1.3.0"
libc = "0.2"
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
regex = "1.2.1"
rlp = { version = "0.3.0", features = ["ethereum"] }
rustc-hex = "2.0.1"
schnorrkel = "0.8.5"
serde = "1.0"
serde_json = "1.0"
substrate-bip39 = "0.3.1"
tiny-bip39 = { version = "0.6.1", default-features = false }
tiny-hderive = "0.1"
tiny-keccak = "1.4"
pixelate = "0.1"
qrcodegen = "1.4"
thiserror = "1.0"
anyhow = "1.0"
ffi-support = "0.4"
raptorq = "1.6.3"
hex = "0.4.3"
frame-metadata = "12.0.1"
zeroize = {version = "1.3.0", features = ["zeroize_derive"]}

[lib]
name = "signer"
crate-type = ["staticlib", "cdylib"]

[features]
default = ["jni"]
42 changes: 42 additions & 0 deletions rust/signer/ios-hack/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[package]
name = "signer"
version = "0.1.0"
authors = ["debris <[email protected]>"]
edition = "2018"

[dependencies]
base58 = "0.1.0"
base64 = "0.10.1"
blake2-rfc = "0.2.18"
blockies = "0.3"
ethsign = { version = "0.7.3", default-features = false, features = ["pure-rust"] }
jni = { version = "0.16.0", optional = true }
lazy_static = "1.3.0"
libc = "0.2"
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
regex = "1.2.1"
rlp = { version = "0.3.0", features = ["ethereum"] }
rustc-hex = "2.0.1"
schnorrkel = "0.8.5"
serde = "1.0"
serde_json = "1.0"
substrate-bip39 = "0.3.1"
tiny-bip39 = { version = "0.6.1", default-features = false }
tiny-hderive = "0.1"
tiny-keccak = "1.4"
pixelate = "0.1"
qrcodegen = "1.4"
thiserror = "1.0"
anyhow = "1.0"
ffi-support = "0.4"
raptorq = "1.6.3"
hex = "0.4.3"
frame-metadata = "12.0.1"
zeroize = {version = "1.3.0", features = ["zeroize_derive"]}

[lib]
name = "signer"
crate-type = ["staticlib"]

[features]
default = ["jni"]
3 changes: 3 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if [ $1 == "android" ]
fi

printf "Building ARM64 Andriod targets...";
cp android-hack/Cargo.toml .
CC_aarch64_linux_android="${ANDROID_PREBUILD_BIN}/aarch64-linux-android${API_LEVEL}-clang" \
CXX_aarch64_linux_android="${ANDROID_PREBUILD_BIN}/aarch64-linux-android${API_LEVEL}-clang++" \
CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_PREBUILD_BIN}/aarch64-linux-android${API_LEVEL}-clang" \
Expand Down Expand Up @@ -60,6 +61,8 @@ if [ $1 == "ios" ]
# Build iOS

printf "Building iOS targets...";

cp ios-hack/Cargo.toml .

for i in "${IOS_ARCHS[@]}";
do
Expand Down

0 comments on commit f301f73

Please sign in to comment.