mirror of
https://github.com/logos-messaging/go-zerokit-rln.git
synced 2026-01-03 21:53:09 +00:00
chore: temporarily remove mobile libraries
This is while we work on reducing the filesize of static libraries
This commit is contained in:
parent
77983a6504
commit
594ddb2452
24
README.md
24
README.md
@ -3,26 +3,12 @@
|
||||
Go wrappers for [zerokit's RLN](https://github.com/vacp2p/zerokit)
|
||||
|
||||
### Building this library
|
||||
|
||||
```
|
||||
git clone https://github.com/status-im/go-zerokit-rln
|
||||
cd go-zerokit-rln
|
||||
git submodule init
|
||||
git submodule update --recursive
|
||||
make
|
||||
```
|
||||
|
||||
Some architectures are not available in cross unless they're locally build. This [PR](https://github.com/cross-rs/cross/pull/591) will update ubuntu base version on cross. But while it's merged, build them locally. To build them locally execute the following instructions (adapted from [here](https://github.com/cross-rs/cross/wiki/FAQ#newer-linux-versions)):
|
||||
|
||||
```
|
||||
git clone --single-branch --depth 1 --branch increment_versions https://github.com/Alexhuszagh/cross
|
||||
cd cross
|
||||
cargo build-docker-image x86_64-pc-windows-gnu
|
||||
cargo build-docker-image aarch64-unknown-linux-gnu
|
||||
cargo build-docker-image x86_64-unknown-linux-gnu
|
||||
cargo build-docker-image arm-unknown-linux-gnueabi
|
||||
cargo build-docker-image i686-unknown-linux-gnu
|
||||
cargo build-docker-image arm-unknown-linux-gnueabihf
|
||||
cargo build-docker-image mips-unknown-linux-gnu
|
||||
cargo build-docker-image mips64-unknown-linux-gnuabi64
|
||||
cargo build-docker-image mips64el-unknown-linux-gnuabi64
|
||||
cargo build-docker-image mipsel-unknown-linux-gnu
|
||||
```
|
||||
|
||||
`i686-pc-windows-gnu`, and `mips` / `mips64` are currently not supported
|
||||
To generate smaller static libraries, before `make`, edit `./zerokit/rln/Cargo.toml` and use `branch = "no-ethers-core"` for `ark-circom`
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define TEST_TREE_HEIGHT 20
|
||||
#define TEST_PARAMETERS_INDEX 2
|
||||
|
||||
typedef struct RLN RLN;
|
||||
|
||||
@ -54,4 +54,8 @@ bool verify_rln_proof(const struct RLN *ctx,
|
||||
|
||||
bool key_gen(const struct RLN *ctx, struct Buffer *output_buffer);
|
||||
|
||||
bool seeded_key_gen(const struct RLN *ctx,
|
||||
const struct Buffer *input_buffer,
|
||||
struct Buffer *output_buffer);
|
||||
|
||||
bool hash(struct RLN *ctx, const struct Buffer *input_buffer, struct Buffer *output_buffer);
|
||||
|
||||
10
rln/link.go
10
rln/link.go
@ -2,25 +2,15 @@ package rln
|
||||
|
||||
/*
|
||||
#cgo LDFLAGS:-lrln -ldl -lm
|
||||
#cgo android,arm64 LDFLAGS:-L${SRCDIR}/../libs/aarch64-linux-android
|
||||
#cgo android,arm7 LDFLAGS:-L${SRCDIR}/../libs/armv7-linux-androideabi
|
||||
#cgo android,amd64 LDFLAGS:-L${SRCDIR}/../libs/x86_64-linux-android
|
||||
#cgo android,386 LDFLAGS:-L${SRCDIR}/../libs/i686-linux-android
|
||||
#cgo linux,arm LDFLAGS:-L${SRCDIR}/../libs/armv7-linux-androideabi
|
||||
#cgo linux,arm64 LDFLAGS:-L${SRCDIR}/../libs/aarch64-unknown-linux-gnu
|
||||
#cgo linux,amd64,musl,!android LDFLAGS:-L${SRCDIR}/../libs/x86_64-unknown-linux-musl
|
||||
#cgo linux,amd64,!musl,!android LDFLAGS:-L${SRCDIR}/../libs/x86_64-unknown-linux-gnu
|
||||
#cgo linux,386 LDFLAGS:-L${SRCDIR}/../libs/i686-unknown-linux-gnu
|
||||
#cgo linux,mips LDFLAGS:-L${SRCDIR}/../libs/mips-unknown-linux-gnu
|
||||
#cgo linux,mips64 LDFLAGS:-L${SRCDIR}/../libs/mips64-unknown-linux-gnuabi64
|
||||
#cgo linux,mips64le LDFLAGS:-L${SRCDIR}/../libs/mips64el-unknown-linux-gnuabi64
|
||||
#cgo linux,mipsle LDFLAGS:-L${SRCDIR}/../libs/mipsel-unknown-linux-gnu
|
||||
#cgo windows,386 LDFLAGS:-L${SRCDIR}/../libs/i686-pc-windows-gnu -lrln -lm -lws2_32 -luserenv
|
||||
#cgo windows,amd64 LDFLAGS:-L${SRCDIR}/../libs/x86_64-pc-windows-gnu -lrln -lm -lws2_32 -luserenv
|
||||
#cgo darwin,386,!ios LDFLAGS:-L${SRCDIR}/../libs/i686-apple-darwin
|
||||
#cgo darwin,arm64,!ios LDFLAGS:-L${SRCDIR}/../libs/aarch64-apple-darwin
|
||||
#cgo darwin,amd64,!ios LDFLAGS:-L${SRCDIR}/../libs/x86_64-apple-darwin
|
||||
#cgo ios,amd64 LDFLAGS:-L${SRCDIR}/../libs/x86_64-apple-ios -framework Security -framework Foundation
|
||||
#cgo ios,arm64 LDFLAGS:-L${SRCDIR}/../libs/aarch64-apple-ios -framework Security -framework Foundation
|
||||
*/
|
||||
import "C"
|
||||
|
||||
@ -8,48 +8,38 @@ then
|
||||
fi
|
||||
|
||||
export RUSTFLAGS="-Ccodegen-units=1"
|
||||
export CROSS_CONFIG="$PWD/scripts/Cross.toml"
|
||||
|
||||
rustup default stable
|
||||
|
||||
cargo install cross --git https://github.com/cross-rs/cross --branch main
|
||||
#cargo install cargo-lipo
|
||||
|
||||
pushd zerokit/rln
|
||||
|
||||
cargo clean
|
||||
|
||||
cross build --release --lib --target=aarch64-linux-android
|
||||
cross build --release --lib --target=armv7-linux-androideabi
|
||||
cross build --release --lib --target=i686-linux-android
|
||||
cross build --release --lib --target=x86_64-linux-android
|
||||
cross build --release --lib --target=x86_64-unknown-linux-musl
|
||||
|
||||
# These depend on https://github.com/cross-rs/cross/pull/591 being merged
|
||||
# In the meantime, we can follow the instructions from here
|
||||
# https://github.com/cross-rs/cross/wiki/FAQ#newer-linux-versions
|
||||
# to build the docker images locally. Once that PR is merged,
|
||||
# remove the CROSS_CONFIG variable and Cross.toml file
|
||||
|
||||
cross build --release --lib --target=aarch64-linux-android
|
||||
cross build --release --lib --target=aarch64-unknown-linux-gnu
|
||||
cross build --release --lib --target=arm-unknown-linux-gnueabi
|
||||
cross build --release --lib --target=arm-unknown-linux-gnueabihf
|
||||
cross build --release --lib --target=armv7-linux-androideabi
|
||||
cross build --release --lib --target=i686-pc-windows-gnu
|
||||
cross build --release --lib --target=i686-unknown-linux-gnu
|
||||
cross build --release --lib --target=x86_64-linux-android
|
||||
cross build --release --lib --target=x86_64-pc-windows-gnu
|
||||
cross build --release --lib --target=x86_64-unknown-linux-gnu
|
||||
cross build --release --lib --target=x86_64-unknown-linux-musl
|
||||
#cross build --release --lib --target=aarch64-linux-android
|
||||
#cross build --release --lib --target=armv7-linux-androideabi
|
||||
#cross build --release --lib --target=i686-linux-android
|
||||
#cross build --release --lib --target=x86_64-linux-android
|
||||
|
||||
# TODO: these work only on iOS
|
||||
cargo install cargo-lipo
|
||||
rustup target add aarch64-apple-ios x86_64-apple-ios x86_64-apple-darwin aarch64-apple-darwin
|
||||
cargo build --release --target=x86_64-apple-darwin --lib
|
||||
cargo build --release --target=aarch64-apple-darwin --lib
|
||||
cargo build --release --target=x86_64-apple-ios --lib
|
||||
cargo build --release --target=aarch64-apple-ios --lib
|
||||
#cargo lipo --release
|
||||
#cargo build --release --target=x86_64-apple-ios --lib
|
||||
#cargo build --release --target=aarch64-apple-ios --lib
|
||||
cargo lipo --release
|
||||
|
||||
popd
|
||||
|
||||
TOOLS_DIR=`dirname $0`
|
||||
|
||||
2
zerokit
2
zerokit
@ -1 +1 @@
|
||||
Subproject commit 53092c286ac5ca031889a735e805897c36564381
|
||||
Subproject commit a5aa4e8d4f02b2f0ff12f74ffdb0ce4fde2ec636
|
||||
Loading…
x
Reference in New Issue
Block a user