dash/apple.rust.deps.sh

375 lines
12 KiB
Bash
Raw Normal View History

Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
#!/bin/sh
set -x
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
set -e
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
# "x86_64-apple-ios"
# "aarch64-apple-ios"
# "aarch64-apple-ios-sim"
# "x86_64-apple-darwin"
# "aarch64-apple-darwin"
# TODO: it's probably needs to be optimized in order to increase better build velocity
# TODO: so we need to combine multiple targets
TARGET=$1
git submodule update --init
MIN_IOS="13.0"
MIN_WATCHOS="5.0"
MIN_TVOS=$MIN_IOS
MIN_MACOS="10.15"
IPHONEOS=iphoneos
IPHONESIMULATOR=iphonesimulator
WATCHOS=watchos
WATCHSIMULATOR=watchsimulator
TVOS=appletvos
TVSIMULATOR=appletvsimulator
MACOS=macosx
LOGICALCPU_MAX=$(sysctl -n hw.logicalcpu_max)
BUILD=build
version_min_flag() {
PLATFORM=$1
FLAG=""
# shellcheck disable=SC2039
# shellcheck disable=SC2053
if [[ $PLATFORM = $IPHONEOS ]]; then
FLAG="-miphoneos-version-min=${MIN_IOS}"
elif [[ $PLATFORM = $IPHONESIMULATOR ]]; then
FLAG="-mios-simulator-version-min=${MIN_IOS}"
elif [[ $PLATFORM = $WATCHOS ]]; then
FLAG="-mwatchos-version-min=${MIN_WATCHOS}"
elif [[ $PLATFORM = $WATCHSIMULATOR ]]; then
FLAG="-mwatchos-simulator-version-min=${MIN_WATCHOS}"
elif [[ $PLATFORM = $TVOS ]]; then
FLAG="-mtvos-version-min=${MIN_TVOS}"
elif [[ $PLATFORM = $TVSIMULATOR ]]; then
FLAG="-mtvos-simulator-version-min=${MIN_TVOS}"
elif [[ $PLATFORM = $MACOS ]]; then
FLAG="-mmacosx-version-min=${MIN_MACOS}"
fi
echo $FLAG
}
prepare() {
download_gmp() {
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
GMP_VERSION="6.3.0"
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
CURRENT_DIR=$(pwd)
echo "$CURRENT_DIR"
# shellcheck disable=SC2039,SC2164
pushd ${BUILD}
mkdir -p "contrib"
if [ ! -s "contrib/gmp-${GMP_VERSION}.tar.bz2" ]; then
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
curl -L -o "contrib/gmp-${GMP_VERSION}.tar.bz2" https://ftp.gnu.org/gnu/gmp/gmp-${GMP_VERSION}.tar.bz2
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
fi
rm -rf "contrib/gmp"
# shellcheck disable=SC2039,SC2164
pushd contrib
tar xfj "gmp-${GMP_VERSION}.tar.bz2"
mv gmp-${GMP_VERSION} gmp
# shellcheck disable=SC2039,SC2164
popd #contrib
# shellcheck disable=SC2039,SC2164
popd #build
}
download_cmake_toolchain() {
if [ ! -s "${BUILD}/ios.toolchain.cmake" ]; then
SHA256_HASH="d02857ff6bd64f1d7109ca59c3e4f3b2f89d0663c412146e6977c679801b3243"
curl -o "${BUILD}/ios.toolchain.cmake" https://raw.githubusercontent.com/leetal/ios-cmake/c55677a4445b138c9ef2650d3c21f22cc78c2357/ios.toolchain.cmake
DOWNLOADED_HASH=$(shasum -a 256 ${BUILD}/ios.toolchain.cmake | cut -f 1 -d " ")
if [ $SHA256_HASH != "$DOWNLOADED_HASH" ]; then
echo "Error: sha256 checksum of ios.toolchain.cmake mismatch" >&2
exit 1
fi
fi
}
download_relic() {
CURRENT_DIR=$(pwd)
echo "$CURRENT_DIR"
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
mkdir -p "${CURRENT_DIR}/${BUILD}/depends"
if [ ! -s "${CURRENT_DIR}/${BUILD}/depends/relic" ]; then
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
# shellcheck disable=SC2039,SC2164
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
pushd "${CURRENT_DIR}/${BUILD}/depends"
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
git clone --depth 1 --branch "feat/ios-support" https://github.com/pankcuf/relic
# shellcheck disable=SC2039,SC2164
pushd relic
git fetch --depth 1 origin 19fb6d79a77ade4ae8cd70d2b0ef7aab8720d1ae
git checkout 19fb6d79a77ade4ae8cd70d2b0ef7aab8720d1ae
# shellcheck disable=SC2039,SC2164
popd #relic
# shellcheck disable=SC2039,SC2164
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
popd #depends
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
fi
}
rm -rf ${BUILD}
mkdir -p ${BUILD}
download_relic
download_gmp
download_cmake_toolchain
}
build_gmp_arch() {
PLATFORM=$1
ARCH=$2
PFX=${PLATFORM}-${ARCH}
# why this works with this host only?
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
HOST=aarch64-apple-darwin
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
# shellcheck disable=SC2039,SC2164
pushd ${BUILD}
SDK=$(xcrun --sdk "$PLATFORM" --show-sdk-path)
PLATFORM_PATH=$(xcrun --sdk "$PLATFORM" --show-sdk-platform-path)
CLANG=$(xcrun --sdk "$PLATFORM" --find clang)
DEVELOPER=$(xcode-select --print-path)
CURRENT_DIR=$(pwd)
export PATH="${PLATFORM_PATH}/Developer/usr/bin:${DEVELOPER}/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin"
mkdir gmplib-"${PLATFORM}"-"${ARCH}"
CFLAGS="-Wno-unused-value -fembed-bitcode -arch ${ARCH} --sysroot=${SDK} $(version_min_flag "$PLATFORM")"
CONFIGURESCRIPT="gmp_configure_script.sh"
# shellcheck disable=SC2039,SC2164
pushd contrib
# shellcheck disable=SC2039,SC2164
pushd gmp
make clean || true
make distclean || true
echo "HOST: $HOST"
echo "PREFIX: ${CURRENT_DIR}/gmplib-${PFX}"
cat >"$CONFIGURESCRIPT" << EOF
#!/bin/sh
./configure \
CC="$CLANG" CFLAGS="$CFLAGS" CPPFLAGS="$CFLAGS" LDFLAGS="$CFLAGS" \
--host=${HOST} --prefix="${CURRENT_DIR}/gmplib-${PFX}" \
--disable-shared --enable-static --disable-assembly -v
EOF
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
chmod a+x "$CONFIGURESCRIPT"
sh "$CONFIGURESCRIPT"
rm "$CONFIGURESCRIPT"
# shellcheck disable=SC2039
mkdir -p "${CURRENT_DIR}/log"
# shellcheck disable=SC2039
make -j "$LOGICALCPU_MAX" &> "${CURRENT_DIR}"/log/gmplib-"${PFX}"-build.log
# shellcheck disable=SC2039
make install &> "${CURRENT_DIR}"/log/gmplib-"${PFX}"-install.log
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
#make check
#exit 1
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
# shellcheck disable=SC2039,SC2164
popd # gmp
# shellcheck disable=SC2039,SC2164
popd # contrib
# shellcheck disable=SC2039,SC2164
popd # build
}
build_relic_arch() {
PLATFORM=$1
ARCH=$2
PFX=${PLATFORM}-${ARCH}
# shellcheck disable=SC2039,SC2164
pushd ${BUILD}
SDK=$(xcrun --sdk "$PLATFORM" --show-sdk-path)
BUILDDIR=relic-"${PFX}"
TOOLCHAIN=$(pwd)/ios.toolchain.cmake
GMP_PFX=$(pwd)/gmplib-${PFX}
rm -rf "$BUILDDIR"
mkdir "$BUILDDIR"
# shellcheck disable=SC2039,SC2164
pushd "$BUILDDIR"
unset CC
# shellcheck disable=SC2155
export CC=$(xcrun --sdk "${PLATFORM}" --find clang)
WSIZE=0
IOS_PLATFORM=""
OPTIMIZATIONFLAGS=""
DEPLOYMENT_TARGET=""
# shellcheck disable=SC2039
# shellcheck disable=SC2053
if [[ $PLATFORM = $IPHONEOS ]]; then
if [[ $ARCH = "arm64" ]] || [[ $ARCH = "arm64e" ]]; then
IOS_PLATFORM=OS64
DEPLOYMENT_TARGET=$MIN_IOS
WSIZE=64
OPTIMIZATIONFLAGS=-fomit-frame-pointer
else
IOS_PLATFORM=OS
WSIZE=32
fi
elif [[ $PLATFORM = $IPHONESIMULATOR ]]; then
if [[ $ARCH = "x86_64" ]]; then
IOS_PLATFORM=SIMULATOR64
DEPLOYMENT_TARGET=$MIN_IOS
WSIZE=64
OPTIMIZATIONFLAGS=-fomit-frame-pointer
elif [[ $ARCH = "arm64" ]]; then
IOS_PLATFORM=SIMULATORARM64
DEPLOYMENT_TARGET=$MIN_IOS
WSIZE=64
else
IOS_PLATFORM=SIMULATOR
WSIZE=32
fi
elif [[ $PLATFORM = $WATCHOS ]]; then
IOS_PLATFORM=WATCHOS
DEPLOYMENT_TARGET=$MIN_WATCHOS
WSIZE=32
elif [[ $PLATFORM = $WATCHSIMULATOR ]]; then
IOS_PLATFORM=SIMULATOR_WATCHOS
DEPLOYMENT_TARGET=$MIN_WATCHOS
WSIZE=32
elif [[ $PLATFORM = $TVOS ]]; then
IOS_PLATFORM=TVOS
DEPLOYMENT_TARGET=$MIN_TVOS
WSIZE=64
OPTIMIZATIONFLAGS=-fomit-frame-pointer
elif [[ $PLATFORM = $TVSIMULATOR ]]; then
IOS_PLATFORM=SIMULATOR_TVOS
#TODO
if [[ $ARCH = "arm64" ]]
then
IOS_PLATFORM=OS64
fi
DEPLOYMENT_TARGET=$MIN_TVOS
WSIZE=64
OPTIMIZATIONFLAGS=-fomit-frame-pointer
elif [[ $PLATFORM = $MACOS ]]; then
WSIZE=64
IOS_PLATFORM=MAC
if [[ $ARCH = "arm64" ]]
then
IOS_PLATFORM=MAC_ARM64
fi
DEPLOYMENT_TARGET=$MIN_MACOS
OPTIMIZATIONFLAGS=-fomit-frame-pointer
fi
COMPILER_ARGS="$(version_min_flag "$PLATFORM") -Wno-unused-functions"
EXTRA_ARGS="-DOPSYS=NONE -DPLATFORM=$IOS_PLATFORM -DDEPLOYMENT_TARGET=$DEPLOYMENT_TARGET -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN"
# shellcheck disable=SC2039
if [[ $ARCH = "i386" ]]; then
EXTRA_ARGS+=" -DARCH=X86"
elif [[ $ARCH = "x86_64" ]]; then
EXTRA_ARGS+=" -DARCH=X64"
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
elif [[ $ARCH = "arm64" ]]; then
# Relic doesn't support aarch64 yet, "ARCH=ARM" is for ARM 32-bit architecture only
EXTRA_ARGS+=" -DIOS_ARCH=arm64 -DARCH="
elif [[ $ARCH = "armv7s" ]]; then
EXTRA_ARGS+=" -DIOS_ARCH=armv7s -DARCH=ARM"
elif [[ $ARCH = "armv7k" ]]; then
EXTRA_ARGS+=" -DIOS_ARCH=armv7k -DARCH=ARM"
elif [[ $ARCH = "arm64_32" ]]; then
EXTRA_ARGS+=" -DIOS_ARCH=arm64_32 -DARCH=ARM"
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
fi
CURRENT_DIR=$(pwd)
cmake -DCMAKE_PREFIX_PATH:PATH="${GMP_PFX}" -DTESTS=0 -DBENCH=0 -DBUILD_BLS_JS_BINDINGS=0 -DBUILD_BLS_PYTHON_BINDINGS=0 \
-DBUILD_BLS_BENCHMARKS=0 -DBUILD_BLS_TESTS=0 -DCHECK=off -DARITH=gmp -DTIMER=HPROC -DFP_PRIME=381 -DMULTI=PTHREAD \
-DFP_QNRES=on -DFP_METHD="INTEG;INTEG;INTEG;MONTY;EXGCD;SLIDE" -DFPX_METHD="INTEG;INTEG;LAZYR" -DPP_METHD="LAZYR;OATEP" \
-DCOMP_FLAGS="-pipe -std=c99 -O3 -funroll-loops $OPTIMIZATIONFLAGS -isysroot $SDK -arch $ARCH -fembed-bitcode ${COMPILER_ARGS}" \
-DWSIZE=$WSIZE -DVERBS=off -DSHLIB=off -DALLOC="AUTO" -DEP_PLAIN=off -DEP_SUPER=off -DPP_EXT="LAZYR" \
-DWITH="DV;BN;MD;FP;EP;FPX;EPX;PP;PC;CP" -DBN_METHD="COMBA;COMBA;MONTY;SLIDE;STEIN;BASIC" ${EXTRA_ARGS} ../../
make -j "$LOGICALCPU_MAX"
# shellcheck disable=SC2039,SC2164
popd # "$BUILDDIR"
# shellcheck disable=SC2039,SC2164
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
popd # depends/relic
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
}
build_bls_arch() {
# shellcheck disable=SC2039
BLS_FILES=( "bls" "chaincode" "elements" "extendedprivatekey" "extendedpublickey" "legacy" "privatekey" "schemes" "threshold" )
# shellcheck disable=SC2039
ALL_BLS_OBJ_FILES=$(printf "%s.o " "${BLS_FILES[@]}")
PLATFORM=$1
ARCH=$2
PFX=${PLATFORM}-${ARCH}
SDK=$(xcrun --sdk "$PLATFORM" --show-sdk-path)
BUILDDIR=${BUILD}/bls-"${PFX}"
rm -rf "$BUILDDIR"
mkdir "$BUILDDIR"
# shellcheck disable=SC2039,SC2164
pushd "$BUILDDIR"
EXTRA_ARGS="$(version_min_flag "$PLATFORM")"
CURRENT_DIR=$(pwd)
# shellcheck disable=SC2039
for F in "${BLS_FILES[@]}"
do
clang -I"../contrib/relic/include" \
-I"../../depends/relic/include" \
-I"../../include/dashbls" \
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
-I"../relic-${PFX}/depends/relic/include" \
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
-I"../../src/" \
-I"../gmplib-${PFX}/include" \
-x c++ -std=c++14 -stdlib=libc++ -fembed-bitcode -arch "${ARCH}" -isysroot "${SDK}" "${EXTRA_ARGS}" \
-c "../../src/${F}.cpp" -o "${F}.o"
done
# shellcheck disable=SC2086
xcrun -sdk "$PLATFORM" ar -cvq libbls.a $ALL_BLS_OBJ_FILES
# shellcheck disable=SC2039,SC2164
popd # "$BUILDDIR"
}
build_all_arch() {
PLATFORM=$1
ARCH=$2
build_gmp_arch "$PLATFORM" "$ARCH"
build_relic_arch "$PLATFORM" "$ARCH"
build_bls_arch "$PLATFORM" "$ARCH"
}
build_target() {
BUILD_IN=$1
echo "Build target: $BUILD_IN"
ARCH=""
PLATFORM=""
# shellcheck disable=SC2039
if [[ $BUILD_IN = "x86_64-apple-ios" ]]; then
ARCH=x86_64
PLATFORM=$IPHONESIMULATOR
elif [[ $BUILD_IN = "aarch64-apple-ios" ]]; then
ARCH=arm64
PLATFORM=$IPHONEOS
elif [[ $BUILD_IN = "aarch64-apple-ios-sim" ]]; then
ARCH=arm64
PLATFORM=$IPHONESIMULATOR
elif [[ $BUILD_IN = "x86_64-apple-darwin" ]]; then
ARCH=x86_64
PLATFORM=$MACOS
elif [[ $BUILD_IN = "aarch64-apple-darwin" ]]; then
ARCH=arm64
PLATFORM=$MACOS
fi
build_all_arch "$PLATFORM" "$ARCH"
PFX="${PLATFORM}"-"${ARCH}"
rm -rf "build/artefacts/${BUILD_IN}"
mkdir -p "build/artefacts/${BUILD_IN}"
cp "build/gmplib-${PFX}/lib/libgmp.a" "build/artefacts/${BUILD_IN}"
Squashed 'src/dashbls/' changes from 795660db76..4e070243ae 4e070243ae chore: bump version to 1.3.3 (#99) d93956254e ci: disable Go bindings CI for macos for now (#98) ae40c5c86d Merge pull request #97 from PastaPastaPasta/refac/pybind-bump-2.13.6 e835ece935 refactor: bump pybind version to 2.13.6 eda5d6a402 chore: change of gmp source (#95) 61f95aa80e chore: cleanup 6.2.1 left overs (#96) adbd094409 Merge pull request #92 from kwvg/darwin_gmp 062ee6726b Merge pull request #90 from UdjinM6/fix_aarch_arch 3538d8b033 fix: aarch64 is not supported, should set ARCH to RELIC_NONE e27a62f4a2 revert: disable gmp if targeting darwin on aarch64 when on 'auto' bb2fe6ee55 build: enforce minimum version of libgmp based on arch and platform 9832b7a132 build: replace deprecated macros `AC_PROG_CC_C99` and `AM_PROG_CC_C_O` b2428718b9 Merge pull request #91 from UdjinM6/fix_macos_test_build 3ffa7fa2b6 chore: bump version to 1.3.2 (#94) 0f4efc9327 Merge pull request #88 from HashEngineering/feat/support-android a181889489 fix: rust bindings build for macos (#89) 738d187359 fix: detect gmp via brew earlier ce4d6a47b6 fix: install libtool 4fa46ccaff fix: use macos-latest for test build 69bdc1aac7 Merge pull request #85 from kwvg/debug 39791d4e31 build: print build options after configure 73106a0121 build: use `-mbranch-protection=bti` on supporting `aarch64` compilers 6a3c28f6ca build: use stricter `-Werror` when testing compile flags 7a1b227637 build: rename {`NO`}`WARN_CFLAGS` to {`NO`}`WARN_FLAGS`, use with C{++} 28bea63838 build: set {`NO`}`WARN_CFLAGS` flags if not overridden and uniformly 32c2f0f5f8 trivial: rename `CORE_CXXFLAGS` to `CORE_FLAGS`, use with C{++} b630c2c323 build: append `HARDENED_FLAGS` to `AM_CFLAGS` e6008148e4 trivial: rename `HARDENED_CXXFLAGS` to `HARDENED_FLAGS` af0e3daef5 build: subsume `PI{C,E}_FLAGS` into `HARDENED_CXXFLAGS` 9ff8618a1b build: expand `--disable-optimizations` to include `-O0` and `-fwrapv` 3036b83181 build: expand `--enable-debug` to include `-O0`, `-ftrapv` and dbg info c90d43d43b build: add check to see if `CFLAGS` has been overridden 2d77f7ae49 build: remove vestigial `LIBTOOL_{CXX,CPP,LD}FLAGS`, `HARDENED_CPPFLAGS` 883a098868 build: autodetect i?86 and arm as 32-bit deb3269820 build: don't specify exact `{CPU_}ARCH` if optimizations are disabled 720d49a44b trivial: fix indentation for `want_backend` check f9328320af build: use `easy` backend if optimizations are disabled unless specified 3687cd59e0 build: define new flag `--enable-optimizations` f82bfee5dd build: ensure help string format matches Autotool defaults d68920063e build: define arguments as `--enable-[term]` instead of `--disable-[term]` 7f41e7dd16 fix: support android 1c2fc79c19 feat(rust): allow to move G1 and G2 elements between threads (#87) 3540b8bbed feat: debug with data hex (#86) git-subtree-dir: src/dashbls git-subtree-split: 4e070243aed142bc458472f8807ab77527dd879a
2024-10-09 16:25:18 +02:00
cp "build/relic-${PFX}/depends/relic/lib/librelic_s.a" "build/artefacts/${BUILD_IN}"
# cp "build/relic-${PFX}/depends/sodium/libsodium.a" "build/artefacts/${BUILD_IN}"
Squashed 'src/dashbls/' changes from 9329803969..795660db76 795660db76 chore: bump version to 1.3.0 (#84) e8743b0139 Merge pull request #83 from UdjinM6/bp_370_371 72f0ad2d37 fix: add missing destructor for CoreMPL and final for nested classes (#371) 2f05059c60 Fix a typo in class PrivateKey testcase. (#370) 851c2c8f68 fix: reading unitialized memory from Util::HasOnlyZeros in G2Element deserialization (#77) 4dd28e9016 fix: js bindings build (#82) 3697c51521 fix: dash is no more pretending being a 'libdashbls' (#76) 37c53141d3 feat: implement memory-copy only of G1Element and G2Element (#74) 97ac99e8e6 build(bls-dash-sys): ignore wasm32 target arch (#70) 2d494d351e Merge pull request #71 from dashpay/feat/threshold_bindings 67fb70d40b chore: revert permission changes in bcce0b214876c0d9e668baaa30a48542b496cda2 5a58fce0ea fix: resolve rust-bindings compilation failure 8604e03761 build: fix cmake build error c25957edf0 Merge remote-tracking branch 'dash/develop' into feat/threshold_bindings2 198e246f07 added a helper for verifying a message a4b8a5dd6e added a helper for verifying a message 2d783c985e added a helper for signing from the private key 16f7873d6a changed to using a slice for recovery a23d9708c0 feat: clone 0cf8a8eb96 feat: serde 47829e3e75 threshold_recovery functions a5589e6fc8 fix: bls extended private key size 1ceaab56e3 [add cpp targts] 86eb28e2d7 [fix linker path for cpp] 85debcab29 [include 'src' into build] f956c66b90 [switch into cc] 9ecb59bf9b [test linker] 3651a0fd79 [linker change] d8564679eb [fix: iossim] c829d4b6f1 [fix: aarch64-apple-darwin trigger] fc3509e901 [chore: silence warning] 79ce6ded50 [feat: apple build for single platform+arch] e580cb76db [feat: build for apple target] 17b2168955 feat: verifySecure method for BasicSchemeMPL in js bindings (#69) 4613425b60 chore: silence rust warnings 136d762607 [fix: target_arch] 0d8c8e9d41 [try to use ios.toolchain] bd441623df [back] 8137f48897 [change relic src] bdcba81d41 test: check patched relic 32b7f56d94 Merge pull request #1 from dashevo/rust-bindings-enhancement 6d359c6201 chore: test for extended private key from short seed 1cbeffe159 chore: add binding dace793a1a fix: same as previous: BIP32ExtendedPrivateKeyFromSeed with len 65c84d063c fix: ok now add second blank line 24b25bac2d fix: now try from typing import Union fe16287182 fix: try Union[Fq2, None] 3ffc96d409 fix: None 2d669a2cf8 chore: up version fbb5a43b19 fix: pass length PrivateKeyFromSeedBIP32 5822076d1a chore: cargo:fmt a8d3a7e956 test: add keys multiplication test 4b85f08937 fix: exchange keys when multiply 0bcefc68cb chore: add imports 7380332123 [chore: add binding for G1ElementMul] 881e6d7676 patch relic to be compatible with wasm bcce0b2148 chore: fix mode 02801cf973 add deeper checks to example project 6d25c60ee5 compilation fixes a4cebb4025 refactor: remove "C" prefix 995ef3796f refactor: bip32 feature 7ea0c34938 style: remove `get` prefix from getters e316c00f7b add VerifySecure da5536e1c5 feat: introduce PrivateKey::from_bip32_seed 4f03a1a1ae export legacy scheme 5c19e314d4 add extended private key cc081c0956 feat: add G1 element's fingerprint and generate methods f3e85b46d0 refactor: move back re-exports e8155b4bdb refactor: move legacy code to submodule f6e173242e add extendedpublickey 4f823249fb feat: legacy serialize and deserialize methods 90fd9f9c2c fix: comparison int with size_t 57237e5e87 Merge branch 'rust-bindings' of github.com:dashevo/bls-signatures into rust-bindings a1f862480b refactor: implement Deref trait for SecureBox 0b6f94e41f add LegacySchemeMPL aa19a77a40 refactor: small refactoring dae8b31042 make schemes public 827d1ed162 add hdkeys 7b4ffae5ec improve agg sig test 18057687be add basic scheme 3e4fdda2bd aggregates 61a4d791c9 elements ser/de 8b5b6301f3 wip 126b7becea wip c49514176e chore: remove autocxx variant 477c014bb7 refactor: increase `c_err_to_result` readability 5d52d0e59d Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 31724b39d1 chore: add example crate c04c2941db safe wrappers for simple case 844779cd81 chore: remove cdylib from bls-signatures d622625de4 chore: move all rust stuff into one 0d3c51106a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings ecf0271950 revert: bring back necessary c binding files :) 20e1cfe37b wip 654fc5e6a6 chore: remove unnecessary files from c binding 92ffd63c28 refactor: cargo build script 1d4d76fb05 chore: remove wrapper.h 20cc668708 qfix abb38804c7 Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings 760a267ab7 build: fix mac related issues 8b083794a4 add destructors to bls-dash-sys basic test 6c54f0a01a Merge remote-tracking branch 'dashevo/rust-bindings' into rust-bindings fd526ab0db build: pass gmp lib path to build.rs a8aaccb510 rust-bindings sign and verify test simple 8447c1c112 wip bindings test 9390162e3c wip add rust-bindings tests 26ab7216c0 revert: bls header path db55e40cb0 rename to sys 96188a6d52 build qfix 965ac58df4 build: automate build process part 2 05636207a0 build: automate build process part 1 73b146a961 experiment cross compiling with autocxx and bindgen 969e5e2102 experiment cross compiling with autocxx and bindgen 88ee9d0519 chore: WIP 525b4d49d9 feat: rust bindings git-subtree-dir: src/dashbls git-subtree-split: 795660db76636c92bea3bfccfee621f1aba371a3
2023-06-28 22:43:42 +02:00
cp "build/bls-${PFX}/libbls.a" "build/artefacts/${BUILD_IN}"
# cp -rf build/bls-"${PFX}"/*.o build/artefacts/"${BUILD_IN}"/include
# cp -rf src/*.hpp build/artefacts/"${BUILD_IN}"/include
# cp -rf build/gmplib-"${PFX}"/include/gmp.h build/artefacts/"${BUILD_IN}"/include
# cp -rf build/relic-"${PFX}"/_deps/relic-build/include/*.h build/artefacts/"${BUILD_IN}"/include
}
prepare
build_target "$TARGET"