Conversation

Replying to
2/ Try out zkREPL at the link below! Build, compile, and test your circuit in-browser in seconds—no installation or dependency management needed. Multiple 0xPARC teams have been using zkREPL to prototype and test complex circuits in the past few months. zkrepl.dev
1
8
4/ A REPL (read-evaluate-print-loop) is a tool that enables programmers to rapidly build and execute programs. Historically, REPLs were among a few key technologies that made programming easier and more accessible to non-specialists/hobbyists interested in computing.
1
3
5/ As ZK and other “programmable cryptography” primitives mature, we’ll need to build similarly new tools to make this tech accessible to more developers. zkREPL builds off of work by contributors like and , taking the ZK dev stack one step further.
1
4
6/ A low-friction browser-based editor seemed like a useful tool, both for new entrants to the space learning about ZK circuits, as well as for experienced ZK devs prototyping circuit components. But the path to implementing zkREPL included a number of interesting challenges.
1
1
7/ Normally, to start writing ZK programs in circom, you’d need to install the entire Rust toolchain and compile the compiler from source. The first step to building zkREPL was to get the Circom compiler to compile into WebAssembly so it could run portably inside a browser.
1
1
8/ To do this, and others had to tackle a number of obstacles—replacing external libraries like WABT, interfacing with the WASI runtime for WASM, and finding and upstreaming various bugfixes to Circom and its dependencies—that you can read about in the linked post.
1
1
10/ zkREPL also contains additional features that developers may find useful. You can: - import code from external URLs - specify test inputs with a special comment syntax - save circuits directly to Github gists - inspect signal values via mousing over them
1
1
11/ There are still a number of useful additions that could be made: improving mobile compatibility by building on top of CodeMirror 6; collaborative editing; integration with static analysis tools like Ecne, and more.
1
1
12/ On the other side, zkREPL can be used to make new tools and educational experiences: for example, interactive tutorials with embedded zkREPL iframes!
1
1
14/ Thanks to 0xPARC Learning Group #1 and many community members for inspiration and feedback, and to and the circom/snarkjs ecosystem (especially and ) for contributions and support. We hope to see further work on tools like zkREPL!
1
6