Skip to content

Commit

Permalink
v0.1.0 (#222)
Browse files Browse the repository at this point in the history
* v0.1.0

* chore: simplify cargo.toml

* chore: apply suggestions
  • Loading branch information
vivianjeng authored Jul 25, 2024
1 parent 27787bb commit 4f688f1
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 38 deletions.
47 changes: 24 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ default = ["mopro-ffi/circom"]
[dependencies]
mopro-ffi = { git = "https://github.com/zkmopro/mopro.git" }
uniffi = { version = "0.28", features = ["cli"] }
rust-witness = { git = "https://github.com/vimwitch/rust-witness.git" }
rust-witness = "0.1.0"
num-bigint = "0.4.0"

[build-dependencies]
rust-witness = { git = "https://github.com/vimwitch/rust-witness.git" }
rust-witness = "0.1.0"
mopro-ffi = { git = "https://github.com/zkmopro/mopro.git" }
uniffi = { version = "0.28", features = ["build"] }
```
Expand Down
18 changes: 10 additions & 8 deletions mopro-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
name = "mopro-ffi"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
description = "Mopro is a toolkit for ZK app development on mobile. Mopro makes client-side proving on mobile simple."
license = "MIT OR Apache-2.0"
repository = "https://github.com/zkmopro/mopro"
documentation = "https://zkmopro.org/"
homepage = "https://zkmopro.org/"
exclude = ["target/*"]

[lib]
name = "mopro_ffi"
Expand All @@ -17,6 +21,7 @@ default = []

halo2 = []
circom = [
"rust-witness",
"ark-circom",
"ark-serialize",
"ark-ec",
Expand All @@ -32,15 +37,15 @@ circom = [
]

[dependencies]
rust-witness = { git = "https://github.com/vimwitch/rust-witness.git" }
uniffi = { version = "=0.28.0", features = ["cli", "build"] }

# Error handling
thiserror = "=1.0.39"
color-eyre = "=0.6.2"

# circom deps
ark-circom = { git = "https://github.com/zkmopro/circom-compat.git", branch = "wasm-delete", optional = true }
rust-witness = { version = "0.1.0", optional = true }
ark-circom = { git = "https://github.com/zkmopro/circom-compat.git", version = "0.1.0", branch = "wasm-delete", optional = true }
ark-serialize = { version = "=0.4.1", features = ["derive"], optional = true }
num-bigint = { version = "0.4.3", default-features = false, features = [
"rand",
Expand All @@ -66,20 +71,17 @@ ark-bls12-381 = { version = "0.4.0", optional = true }
num-traits = { version = "0.2.0", optional = true }

[build-dependencies]
rust-witness = { git = "https://github.com/vimwitch/rust-witness.git" }
rust-witness = "0.1.0"
uniffi = { version = "=0.28.0", features = ["build"] }

[dev-dependencies]
uniffi = { version = "=0.28.0", features = ["bindgen-tests"] }
# Circom test dependency
ark-bn254 = { version = "=0.4.0" }

rust-witness = { git = "https://github.com/vimwitch/rust-witness.git" }
color-eyre = "0.6"
serde = { version = "1.0", features = ["derive"] }
serde_derive = "1.0"

# Halo2 dependencies
halo2-fibonacci = { git = "https://github.com/ElusAegis/halo2-fibonacci-sample.git" }


29 changes: 26 additions & 3 deletions mopro-ffi/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
# mopro-ffi

This is the main/only crate that is used to build mopro apps.
Mopro is a toolkit for ZK app development on mobile. Mopro makes client-side proving on mobile simple.

## `SwiftBindings`
## Getting started

- Make sure you've installed the [prerequisites](https://zkmopro.org/docs/prerequisites).
- Getting started with this [tutorial](https://zkmopro.org/docs/getting-started/rust-setup).

## Run tests

- circom
```sh
cargo test --features circom
```
- halo2
```sh
cargo test --features halo2
```

## Bindings

- `SwiftBindings`
- `KotlinBindings`

The uniffi bindings are precompiled and committed here for a specifically named crate. This avoids the complexity of building/invoking the uniffi cli by dependent packages. Note that dependent crates _must_ have the library name `mopro_bindings`, or rebuild the binding themselves.

Expand All @@ -16,4 +35,8 @@ Includes all proving and serialization logic for circom proofs. Does _not_ inclu

### `halo2`

Includes proving logic for halo2. Implementation is currently stubbed.
Includes all proving logic for halo2.

## Community
- Telegram: https://t.me/zkmopro
- X: https://x.com/zkmopro
4 changes: 2 additions & 2 deletions test-e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mopro-ffi = { path = "../mopro-ffi", features = ["halo2", "circom"] }
uniffi = "0.28.0"

# Circom dependencies
rust-witness = { git = "https://github.com/vimwitch/rust-witness.git" }
rust-witness = "0.1.0"
num-bigint = { version = "0.4.0" }

# Halo2 dependencies
Expand All @@ -30,7 +30,7 @@ mopro-ffi = { path = "../mopro-ffi" }
uniffi = { version = "0.28.0", features = ["build"] }

# Circom dependencies
rust-witness = { git = "https://github.com/vimwitch/rust-witness.git" }
rust-witness = "0.1.0"

[dev-dependencies]
uniffi = { version = "0.28.0", features = ["bindgen-tests"] }

0 comments on commit 4f688f1

Please sign in to comment.