Skip to content

Commit 5f50f04

Browse files
authored
Merge pull request #114 from dashpay/chore/release-mode
Chore/release mode
2 parents 7005c26 + 6cbc524 commit 5f50f04

File tree

15 files changed

+879
-1045
lines changed

15 files changed

+879
-1045
lines changed

Cargo.lock

Lines changed: 337 additions & 441 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DashSharedCore.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
1414

1515
s.prepare_command = <<-CMD
1616
cd dash-spv-apple-bindings
17-
./build.sh debug
17+
./build.sh
1818
CMD
1919

2020
s.source_files = 'dash-spv-apple-bindings/target/include/**/*.h'

dash-spv-apple-bindings/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
./.cargo/
88
Cargo.lock
99
DashSharedCore
10+
tmp
1011

1112
# These are backup files generated by rustfmt
1213
**/*.rs.bk

dash-spv-apple-bindings/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ ferment-sys = { version = "0.2", package = "ferment-sys" }
5050
#ferment-sys = { path = "../../ferment/ferment-sys", features = ["objc"] }
5151

5252
[features]
53+
fermentize = []
5354
default = ["state-transitions", "std", "message_verification", "quorum_validation"]
5455
bls-signatures = ["dpp/bls-signatures"]
5556
blsful = ["dashcore/blsful"]

dash-spv-apple-bindings/build.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
extern crate ferment_sys;
22

3+
#[cfg(feature = "fermentize")]
34
use ferment_sys::Ferment;
45
// #[cfg(feature = "objc")]
56
// use ferment_sys::{Lang, ObjC, XCodeConfig};
@@ -11,7 +12,7 @@ fn main() {
1112
return; // Exit early in debug mode
1213
}
1314
}
14-
15+
#[cfg(feature = "fermentize")]
1516
match Ferment::with_crate_name("dash_spv_apple_bindings")
1617
.with_cbindgen_config_from_file("cbindgen.toml")
1718
.with_default_mod_name()
@@ -40,4 +41,8 @@ fn main() {
4041
Ok(_) => println!("[ferment] [ok]"),
4142
Err(err) => panic!("[ferment] [err]: {}", err)
4243
}
44+
#[cfg(not(feature = "fermentize"))]
45+
{
46+
println!("Fermentation is disabled. Skipping build.rs.");
47+
}
4348
}

dash-spv-apple-bindings/build.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,23 @@ else
7777
features=""
7878
fi
7979

80+
fermentize=1
8081
for target in "${build_targets[@]}"; do
8182
echo "▶ Building for $target"
8283
lib_path="../../target/$target/$BUILD_TYPE/lib${LIB_NAME}.a"
84+
85+
if [ "$fermentize" -eq 1 ]; then
86+
extra_features="fermentize"
87+
fermentize=0
88+
else
89+
extra_features=""
90+
fi
91+
8392
if [ ! -f "$lib_path" ]; then
84-
cargo +nightly -Z build-std=std,compiler_builtins build --features="$features" --target="$target" --"$BUILD_FLAG"
93+
cargo +nightly -Z build-std=std,compiler_builtins build \
94+
--features="$features $extra_features" \
95+
--target="$target" \
96+
--"$BUILD_FLAG"
8597
fi
8698
done
8799

0 commit comments

Comments
 (0)