From 4f688f13b46e661aaf677f3349b23fb25ea0c51f Mon Sep 17 00:00:00 2001 From: "Ya-wen, Jeng" Date: Thu, 25 Jul 2024 18:54:29 -0500 Subject: [PATCH] v0.1.0 (#222) * v0.1.0 * chore: simplify cargo.toml * chore: apply suggestions --- Cargo.lock | 47 ++++++++++++++++++++++---------------------- README.md | 4 ++-- mopro-ffi/Cargo.toml | 18 +++++++++-------- mopro-ffi/README.md | 29 ++++++++++++++++++++++++--- test-e2e/Cargo.toml | 4 ++-- 5 files changed, 64 insertions(+), 38 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f8afc96..95b67944 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -333,9 +333,9 @@ checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" @@ -366,7 +366,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -403,7 +403,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -552,7 +552,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", "syn_derive", ] @@ -645,9 +645,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052" +checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" [[package]] name = "cfg-if" @@ -727,7 +727,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -960,7 +960,7 @@ checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -1876,7 +1876,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2338,7 +2338,8 @@ dependencies = [ [[package]] name = "rust-witness" version = "0.1.0" -source = "git+https://github.com/vimwitch/rust-witness.git#768dd39b6987be78e45556d56755097bfe77934f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bfa72e46b45a7969311cc2780c62b6e41dce9f5d5f84f0af8d84e5516acf88" dependencies = [ "cc", "fnv", @@ -2460,7 +2461,7 @@ checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2533,7 +2534,7 @@ checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2712,9 +2713,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.71" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -2730,7 +2731,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2910,7 +2911,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -3070,7 +3071,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fcfa22f55829d3aaa7acfb1c5150224188fe0f27c59a8a3eddcaa24d1ffbe58" dependencies = [ "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -3101,7 +3102,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.71", + "syn 2.0.72", "toml", "uniffi_meta", ] @@ -3219,7 +3220,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", "wasm-bindgen-shared", ] @@ -3241,7 +3242,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3410,7 +3411,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -3430,5 +3431,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] diff --git a/README.md b/README.md index 10d61048..d2f82c0d 100644 --- a/README.md +++ b/README.md @@ -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"] } ``` diff --git a/mopro-ffi/Cargo.toml b/mopro-ffi/Cargo.toml index 726fc47a..e393ae14 100644 --- a/mopro-ffi/Cargo.toml +++ b/mopro-ffi/Cargo.toml @@ -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" @@ -17,6 +21,7 @@ default = [] halo2 = [] circom = [ + "rust-witness", "ark-circom", "ark-serialize", "ark-ec", @@ -32,7 +37,6 @@ circom = [ ] [dependencies] -rust-witness = { git = "https://github.com/vimwitch/rust-witness.git" } uniffi = { version = "=0.28.0", features = ["cli", "build"] } # Error handling @@ -40,7 +44,8 @@ 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", @@ -66,7 +71,7 @@ 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] @@ -74,12 +79,9 @@ 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" } - - diff --git a/mopro-ffi/README.md b/mopro-ffi/README.md index c35b1de9..f2f11135 100644 --- a/mopro-ffi/README.md +++ b/mopro-ffi/README.md @@ -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. @@ -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. \ No newline at end of file +Includes all proving logic for halo2. + +## Community +- Telegram: https://t.me/zkmopro +- X: https://x.com/zkmopro \ No newline at end of file diff --git a/test-e2e/Cargo.toml b/test-e2e/Cargo.toml index 2f537eed..0da70f20 100644 --- a/test-e2e/Cargo.toml +++ b/test-e2e/Cargo.toml @@ -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 @@ -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"] }