Contributing

While Garble was developed by us at the SINE Foundation for the use in our MPC engine, we would love to see how you end up using Garble and are happy to accept pull requests. Garble is distributed under the MIT license and hosted on GitHub:

Github

The Garble compiler is relatively straightforward and turns a program &str into a circuit::Circuit (or aborts with a scan/parse/type error). The different steps and their modules are as follows (with steps 1-4 happening during compile time, step 5 is optional and happens during run time):

  1. scan.rs splits a program &str into a token::Token sequence.
  2. parse.rs parses a token::Token sequence into an untyped ast::Program.
  3. check.rs type-checks an untyped ast::Program, returning a typed ast::Program.
  4. compile.rs converts a well-typed ast::Program into a circuit::Circuit.
  5. eval.rs executes a circuit::Circuit with locally supplied inputs, not using any MPC or other privacy-preserving techniques.

You can also reach us at vorstand@sine.foundation.