This project is read-only.

Compiling C to a circuit

Feb 3, 2015 at 8:02 PM

I've been trying to follow both the notes/discussions on here and the README file but am relatively new to programming so am struggling to get my head around how to compile a circuit from a C program using the program. Can anyone advise me on how to do this?

Also I've noticed in the README file it states "Running "make -f make.matrix" should produce a build directory containing circuits and executables." I have done this and obtained the build directory but is it supposed to contain anything in it or do I have to create my own input files within this directory?

Feb 9, 2015 at 10:26 PM

As noted in the README file, you need to edit the settings in common/ to select the (existing) applications you'd like to include. That's probably a good place to start, but once you have applications of your own, you'll want to follow that template for adding your own apps. After you've edited common/, running ../src/ will create the corresponding make file, and then you can use "make -f make.matrix". You can look inside the relevant makefiles (e.g., make.matrix and to see which options you can build. You'll also see some examples that run the various Pinocchio tools; you may want to experiment with invoking those directly, if you want to better understand how they interact and what they take as input and produce as output.