mirror of
https://github.com/vacp2p/semaphore-rs.git
synced 2025-02-24 01:28:28 +00:00
Update deps and build instructions
This commit is contained in:
parent
576a3ad937
commit
81e10b9c75
45
Cargo.lock
generated
45
Cargo.lock
generated
@ -79,7 +79,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ark-circom"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/philsippl/ark-circom#894aac9a20e5bb8fa26bf9cc7639134147ec1454"
|
||||
source = "git+https://github.com/philsippl/ark-circom#eb53e6edb2a96ad41adcf44f2f213e6c0f9ee820"
|
||||
dependencies = [
|
||||
"ark-bn254",
|
||||
"ark-ec",
|
||||
@ -321,9 +321,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.63"
|
||||
version = "0.3.64"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6"
|
||||
checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f"
|
||||
dependencies = [
|
||||
"addr2line",
|
||||
"cc",
|
||||
@ -1121,7 +1121,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9"
|
||||
dependencies = [
|
||||
"der 0.5.1",
|
||||
"elliptic-curve 0.11.10",
|
||||
"elliptic-curve 0.11.12",
|
||||
"rfc6979",
|
||||
"signature",
|
||||
]
|
||||
@ -1150,9 +1150,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "elliptic-curve"
|
||||
version = "0.11.10"
|
||||
version = "0.11.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23f80ad035a844638d4ce3d4a27ef4e00f2304e1a37f9f43c6a3c73622f39e79"
|
||||
checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6"
|
||||
dependencies = [
|
||||
"base16ct",
|
||||
"crypto-bigint 0.3.2",
|
||||
@ -1237,7 +1237,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ethabi"
|
||||
version = "16.0.0"
|
||||
source = "git+https://github.com/rust-ethereum/ethabi?branch=master#c622438f9fd2ac2f9b3c38ecb1ca760c069d9ec2"
|
||||
source = "git+https://github.com/rust-ethereum/ethabi?branch=master#6f18e11621d29b6cd978ef39b48fa572b823bb80"
|
||||
dependencies = [
|
||||
"ethereum-types",
|
||||
"hex",
|
||||
@ -1351,12 +1351,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ethers-core"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/gakonst/ethers-rs#c22dd8eab4c7e4c848446f80ec1dc0e4a8e76079"
|
||||
source = "git+https://github.com/gakonst/ethers-rs#dc1565c0149e03ce20c2cdf76c1aaaf9fc2e3deb"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bytes",
|
||||
"ecdsa 0.13.4",
|
||||
"elliptic-curve 0.11.10",
|
||||
"elliptic-curve 0.11.12",
|
||||
"ethabi 16.0.0",
|
||||
"generic-array 0.14.5",
|
||||
"hex",
|
||||
@ -1382,7 +1382,7 @@ dependencies = [
|
||||
"cargo_metadata",
|
||||
"convert_case",
|
||||
"ecdsa 0.12.4",
|
||||
"elliptic-curve 0.11.10",
|
||||
"elliptic-curve 0.11.12",
|
||||
"ethabi 15.0.0",
|
||||
"generic-array 0.14.5",
|
||||
"hex",
|
||||
@ -1477,7 +1477,7 @@ dependencies = [
|
||||
"async-trait",
|
||||
"coins-bip32",
|
||||
"coins-bip39",
|
||||
"elliptic-curve 0.11.10",
|
||||
"elliptic-curve 0.11.12",
|
||||
"eth-keystore",
|
||||
"ethers-core 0.6.3",
|
||||
"futures-executor",
|
||||
@ -2116,7 +2116,7 @@ checksum = "1cc5937366afd3b38071f400d1ce5bd8b1d40b5083cc14e6f8dbcc4032a7f5bb"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"ecdsa 0.13.4",
|
||||
"elliptic-curve 0.11.10",
|
||||
"elliptic-curve 0.11.12",
|
||||
"sec1",
|
||||
"sha3",
|
||||
]
|
||||
@ -2141,9 +2141,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.115"
|
||||
version = "0.2.116"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a8d982fa7a96a000f6ec4cfe966de9703eccde29750df2bb8949da91b0e818d"
|
||||
checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
@ -2175,6 +2175,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"poseidon-rs",
|
||||
"proptest",
|
||||
"rayon",
|
||||
"serde",
|
||||
"sha2 0.10.1",
|
||||
]
|
||||
@ -3318,9 +3319,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "security-framework"
|
||||
version = "2.5.0"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d09d3c15d814eda1d6a836f2f2b56a6abc1446c8a34351cb3180d3db92ffe4ce"
|
||||
checksum = "3fed7948b6c68acbb6e20c334f55ad635dc0f75506963de4464289fbd3b051ac"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"core-foundation",
|
||||
@ -3331,9 +3332,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "security-framework-sys"
|
||||
version = "2.5.0"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e90dd10c41c6bfc633da6e0c659bd25d31e0791e5974ac42970267d59eba87f7"
|
||||
checksum = "a57321bf8bc2362081b2599912d2961fe899c0efadf1b4b2f8d48b3e253bb96c"
|
||||
dependencies = [
|
||||
"core-foundation-sys",
|
||||
"libc",
|
||||
@ -3623,9 +3624,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
|
||||
|
||||
[[package]]
|
||||
name = "target-lexicon"
|
||||
version = "0.12.2"
|
||||
version = "0.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff"
|
||||
checksum = "d7fa7e55043acb85fca6b3c01485a2eeb6b69c5d21002e273c79e465f43b7ac1"
|
||||
|
||||
[[package]]
|
||||
name = "tempfile"
|
||||
@ -3862,9 +3863,9 @@ checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
|
||||
|
||||
[[package]]
|
||||
name = "uint"
|
||||
version = "0.9.1"
|
||||
version = "0.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f"
|
||||
checksum = "1b1b413ebfe8c2c74a69ff124699dd156a7fa41cb1d09ba6df94aa2f2b0a4a3a"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"crunchy",
|
||||
|
19
Cargo.toml
19
Cargo.toml
@ -5,6 +5,10 @@ edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[lib]
|
||||
name = "semaphore"
|
||||
crate-type = ["staticlib", "cdylib"]
|
||||
|
||||
[dependencies]
|
||||
ark-circom = { git = "https://github.com/philsippl/ark-circom", features=["circom-2"] }
|
||||
ark-std = { version = "0.3.0", default-features = false, features = ["parallel"] }
|
||||
@ -23,4 +27,17 @@ once_cell = "1.8"
|
||||
serde = "1.0"
|
||||
ethers = "0.6"
|
||||
hex-literal = "0.3"
|
||||
proptest = { version = "1.0", optional = true }
|
||||
proptest = { version = "1.0", optional = true }
|
||||
rayon = "1.5.1"
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
panic = "abort"
|
||||
opt-level = 3
|
||||
|
||||
# Compilation profile for any non-workspace member.
|
||||
# Dependencies are optimized, even in a dev build. This improves dev performance
|
||||
# while having neglible impact on incremental build times.
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 3
|
||||
|
36
README.md
36
README.md
@ -1,4 +1,36 @@
|
||||
# README
|
||||
|
||||
## mobile
|
||||
`cargo build --release --lib --target aarch64-apple-ios`
|
||||
## Native ios library
|
||||
|
||||
|
||||
### Setup build environnement
|
||||
|
||||
See the [instructions from Mozilla](https://mozilla.github.io/firefox-browser-architecture/experiments/2017-09-06-rust-on-ios.html).
|
||||
|
||||
We will focus only on `aarch64` and skip the multi-arch. This means an iPhone 5S or later is required.
|
||||
|
||||
```shell
|
||||
xcode-select --install
|
||||
rustup target add aarch64-apple-ios
|
||||
xcrun --show-sdk-path --sdk iphoneos
|
||||
```
|
||||
|
||||
If you get the error `xcrun: error: SDK "iphoneos" cannot be located`, run `sudo xcode-select --switch /Applications/Xcode.app`. See [here](https://www.ryadel.com/en/xcode-sdk-iphoneos-cannot-be-located-mac-osx-error-fix/).
|
||||
|
||||
### Build library
|
||||
|
||||
```shell
|
||||
cargo build --release --lib --target aarch64-apple-ios
|
||||
```
|
||||
|
||||
```shell
|
||||
ls -lah ./target/aarch64-apple-ios/release
|
||||
```
|
||||
|
||||
### Check bloatiness
|
||||
|
||||
We can not check the static library directly. Instead we will compile a minimal executable that uses it and check that.
|
||||
|
||||
```shell
|
||||
cargo bloat --release --target aarch64-apple-ios --crates -n 30
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user