fmt fixes

This commit is contained in:
Matthew Liu
2023-07-17 12:45:25 -07:00
parent 4bf7043b77
commit 71bb374add

View File

@@ -13,10 +13,14 @@ async fn main() {
#[fhe_program(scheme = "bfv")]
fn add_squares(a: Cipher<Signed>, b: Cipher<Signed>) -> Cipher<Signed> {
a*a + b*b
a * a + b * b
}
let app = Compiler::new().fhe_program(mad).fhe_program(add_squares).compile().unwrap();
let app = Compiler::new()
.fhe_program(mad)
.fhe_program(add_squares)
.compile()
.unwrap();
let runtime = Runtime::new_fhe(app.params()).unwrap();
@@ -27,20 +31,20 @@ async fn main() {
let c = a.clone();
let args1: Vec<FheProgramInput> = vec![a.clone().into(), b.clone().into(), c.clone().into()];
runtime
.debug_fhe_program(
app.get_fhe_program("mad").unwrap(),
args1,
&public,
&private.0,
&mad.source()
&mad.source(),
)
.await;
// TODO: figure out how to set it up so that we can have multiple running at the same time
// maybe set up a server once at the start of the main method, then just have endpoints like
// /programs/{function name} to be able to see
// maybe set up a server once at the start of the main method, then just have endpoints like
// /programs/{function name} to be able to see
let args2: Vec<FheProgramInput> = vec![a.clone().into(), b.clone().into()];
runtime
@@ -49,7 +53,7 @@ async fn main() {
args2,
&public,
&private.0,
&add_squares.source()
&add_squares.source(),
)
.await;
}
}