Build an online playground for noname
To make the introduction of noname to new users easier as well as help developers write circuits in a simpler fashion, an online playground/compiler can be constructed. This website allows a user to write a sample noname program, compile it, and choose various options about the circuit generated such as backend system.A reference for this is Circom's zkREPL.
that would be great indeed. for reference the go playground, and rust playground
@mimoo I built a quick and dirty first version here: https://noname-code-playground.onrender.com/.
Repo: https://github.com/lognorman20/noname-playground/tree/main
Would love for any feedback
First of all, I love love love it! This is amazing. I'm going to give a demo of noname next week and will use this! Is it possible to easy load any of the examples we have in the examples folder :D?
Second: I'm trying to imagine a UI where we could easily see what constraints and witness gets produced when we create proofs. I think the best thing we can do right now is refactor noname to produce a JSON with the debug output, which could be displayed in HTML (instead of as a terminal output in the bottom). Think similar to https://godbolt.org
Third: I'm wondering how hard it would be to also produce ethereum artifacts from this UI (cc @katat) so that we can easily demo noname using this and remix, and that's it :o (if I could do my demo like that on the 10th that would be amazing)
Fourth, feature request for noname itself: if we could compile noname in WASM we would not need a backend which could be quite nice. But kimchi doesn't support WASM for now so it wouldn't be that simple I believe... (cc @bkase, one )
BTW the example compilation is incorrect o.o but I can't reproduce this locally. Perhaps it's because it's on a version that was buggy. A cool thing would be to display the version of noname as well :D (unfortunately we haven't been good at releasing versions consistently)
I'll work on 1) and 3). As for the compilation being incorrect, what is the expected output? The version of noname is
noname 0.7.0. I installed it using cargo install --git https://www.github.com/zksecurity/noname
I've added predefined examples and prove button that integrates w/ snarkjs. The save proof button doesn't work yet but ill probably do it soon
@mimoo updated with ability to prove, view snarkjs output, download all relevant proof files, and load examples
https://github.com/user-attachments/assets/100670a2-0dfd-4f01-a66e-c611427889a6
This is great!
I think the public_output example is not the same one as the one in example/. Also was it a pain to set the private/public inputs for each example? Maybe we should have these set in files also so it's easy to run them manually.
compilation-wise I was wrong ^^ I think things look good!
BTW feel free to add a link to your repo on the README here
Awesome! It was mostly just copy paste work to get the examples set up. Which public_output are you referring to? The one here looks to be the same. For the private/public inputs I'm referring to the test file.
Side note: I've acquired the domain noname-playground.xyz for the playground. I also will be doing some backend migration in the coming days to make the system more robust, but from my experimentation, everything is working as expected. Please let me know if there's any improvements/feedback you'd like to add and I'll be happy to work on this further.