Web assembly preliminary bindings
Build test with emmake make emscripten_binfhe
and run it with node js/example/boolean.js
.
Most of the required changes were simply adding non-overloaded C++ methods such that EMSCRIPTEN can easily infer the types.
Questions
For now, I coerced native types to their primitive equivalents (for example, LWEPlaintext is represented using a number). Would it be more secure to add a wrapper type such that JS never has direct access to the LWECiphertext value?
TODO
Parse enums using https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#enums