-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docs with adding a new halo2 circuit in 'mopro-wam' #292
base: main
Are you sure you want to change the base?
Conversation
- [Android Studio](https://developer.android.com/studio) | ||
- Also see [configuration](#android-configuration) below | ||
- [JDK(Java Development Kit)](https://www.oracle.com/java/technologies/downloads) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can switch the order to
- Android Studio
- JDK
- Also see configuration
because when a user see below, he will miss the JDK
|
||
Follow these steps to update and build the user-defined circuit implementation for Wasm: | ||
|
||
1. **Update `Cargo.toml` in 'mopro-wasm'** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the users should use mopro-wasm-lib
(in mopro-example-app
) instead of mopro-wasm
in zkmopro
.
Because in the future, the users don't need to clone the repo zkmopro/mopro
and they can use CLI
(I think we should support mopro
binary for users to use mopro CLI
like circom, they support binaries
so they don't need to clone the repo and use the binary)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should let users know how to generate bindings with rust setup
like in Flutter setup or React Native setup
(Just redirect them to rust setup and choose web
as target)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the users should use
mopro-wasm-lib
(inmopro-example-app
) instead ofmopro-wasm
inzkmopro
.
For align consistancy with other setup doc, we should add create mopro-wasm-lib
like "setup the rust project" in Rust setup and remove the "Proving from web browser" section :https://zkmopro.org/docs/setup/web-wasm-setup#proving-from-web-browser.
What do you think?
Because in the future, the users don't need to clone the repo
zkmopro/mopro
and they can use CLI (I think we should supportmopro
binary for users to use mopro CLI like circom, they support binaries so they don't need to clone the repo and use the binary)
I totally agree. but currently only simple doc "Getting Started" for about how to setup with the mopro cli.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For align consistancy with other setup doc, we should add create mopro-wasm-lib like "setup the rust project" in Rust setup and remove the "Proving from web browser" section :https://zkmopro.org/docs/setup/web-wasm-setup#proving-from-web-browser.
What do you think?
We should let user simply uses mopro init
, mopro build
for web
and he will find mopro-wasm-lib
within the folder
(I realized that we should update react native setup and flutter setup, and guide them to look Getting Started section instead of Rust Setup section)
and yes we can remove the "Proving from web browser" section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I will update other setup docs that to rely on using mopro cli
instead of starting with Rust Setup
page.
|
||
2. **Create Wrapper Functions for Generate/Verify proof method**: | ||
|
||
To compile Wasm code with the circuit, wrapper functions for generating and verifying proof methods in the user-defined circuit implementation must be created in `mopro-wasm/src/lib.rs`, using the example structure provided below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be mopro-wasm-lib/src/lib.rs
too
The following command builds the wasm package in "mopro-wasm": | ||
|
||
```shell | ||
mopro-wasm $ wasm-pack build --target web --out-name my-halo2-circuit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also let users use mopro build
🙏🏻
mopro-wasm