Sunscreen
Sunscreen copied to clipboard
Compiler params
Allow setting FHE params without FHE programs.
This changes the semantic meaning of the markers on the Compiler
struct. Now Compiler<T: Fhe>
means that the compiler has derivable FHE parameters, either through manually set params or through FHE program arguments.
I've also moved the program getters onto the generic Application
type... calling app.get_fhe_programs()
and getting an empty hashmap if you haven't provided FHE programs is quite reasonable behavior.
The only type safety lost really is that now you could call Compiler::with_params().compile()
and get a runtime Err(NoPrograms)
rather than a compile-time error. But imo providing type safety against such an error is not very valuable.
~~Depends on #358 / #361~~ Actually this diff is independent of the linked docs and verification builder, so I rebased the changes onto main
and will mark PR ready for review.