| Crates.io | garble_lang |
| lib.rs | garble_lang |
| version | 0.6.1 |
| created_at | 2022-07-26 14:21:43.72295+00 |
| updated_at | 2025-03-19 20:49:33.574577+00 |
| description | Turing-Incomplete Programming Language for Multi-Party Computation with Garbled Circuits |
| homepage | |
| repository | https://github.com/sine-fdn/garble/ |
| max_upload_size | |
| id | 633201 |
| size | 675,594 |
Garble is a simple programming language for Multi-Party Computation. Garble programs are compiled to Boolean circuits and always terminate, making them ideal for Garbled Circuits. Garble is statically typed, low-level, purely functional and uses a Rust-like syntax. Garble is much simpler than Rust though, making it easy to learn and simple to integrate into MPC engines.
// A program for solving Yao's Millionaires' problem in Garble:
enum Richest {
IsA,
IsB,
Tie,
}
pub fn main(a: u64, b: u64) -> Richest {
if a > b {
Richest::IsA
} else if b > a {
Richest::IsB
} else {
Richest::Tie
}
}
To learn more about Garble, check out the website.