-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support kimchi and string type in debugger API #219
Comments
I think being able to write a third feature request would be to make it work with any types (array, structs, etc.) not just field types |
Would like to try this, although I might need some guidance. Can I try taking this? |
correct me if I'm wrong @katat but a first PR could just add support for string literals in the lexer/parser logic, so you can write things like |
It would also need to encode the string literal, so they can be passed around. I think it can be similar to how the literal boolean and ints are encoded. noname/src/circuit_writer/writer.rs Lines 680 to 697 in 34162a7
For both ints and booleans, they are represented by a single field. For string literals, they could be represented by an array of fields, each of which represent an ASCII code (a character of a string). |
Sounds good! @cwkang1998 |
The recent addition allows printing out variable values via
log(var)
builtin function.However, it only supports the R1CS backend atm. Also, because noname doesn't support the string type variable yet, the
log
stdlib can't take a string argument to customize the message per logging output.It would be very nice to have the following enhancements:
Implement the log_var function for the kimchi backend. For reference, please check how the logging is implemented in R1CS backend.
Support parsing strings in native code, so a customized logging message can be passed to the logging function. At this stage, we may just implement a builtin string type (read only) in order to pass to the
log
function. Later, we can extend this string type to be able to encoded in the circuit.The text was updated successfully, but these errors were encountered: