zksecurity / noname

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

chore(cli): cleanup backend option #112

Closed eightfilms closed 1 month ago

eightfilms commented 1 month ago

derive ValueEnum for BackendOpt - we use clap's builtin enum support to do validation and parsing.

Also implement From<BackendOpt> for BackendKind to simplify the flow.

Some screenshots:

Not specifying any backends: cargo run -- run --backend

Screenshot 2024-06-10 at 9 20 57 PM

Mistyping a backend: cargo run -- run --backend kimchi

Screenshot 2024-06-10 at 9 21 17 PM

katat commented 1 month ago

This is so nice! It simplifies the things a lot! There is a conflict with the main branch. Do you mind resolving it? Otherwise it looks all good to me.

eightfilms commented 1 month ago

@katat resolved - also made r1cs-bn254 the default for the run command