zksecurity / noname

Noname: a programming language to write zkapps
https://zksecurity.github.io/noname/
178 stars 44 forks source link

noname cli: read input/output JSON from file #92

Closed vuvoth closed 2 months ago

vuvoth commented 3 months ago

Motivation

We only read public input/output by passed in the cli as a string. This is good if we can read input from file.

 cargo run test --backend r1cs-bn254 --path examples/arithmetic.no --private-inputs '{"private_input": "1"}' --public-inputs '{"public_input": "1"}' --debug

We can make cli above more simple:

 cargo run test --backend r1cs-bn254 --path examples/arithmetic.no --private-inputs private_input.json --public-inputs ./public_inputs.json--debug 

How to solve it?

Another solution is try parse json, if can not we will try parse as file path.

varun-doshi commented 3 months ago

I'd like to work on this