Introduction:
I am building a plugin for Firefox version 31.5.0 using the cfx tool. I have been provided with a C++ SDK with header files, .dll files and a .lib file. For this application, I cannot run any scripts or programs on the server, so all code has to work on the client side. Is it possible to integrate this library into my Firefox Plugin (coded mostly in Javascript) such that everything runs on the client side?
Conditions:
I know this isn't the best way to go about developing a web plugin, but it is a requirement I'm faced with. I cannot run anything server side.
Emscripten is a tool I've heard about to convert C++ code to Javascript. For those who have used this tool, are there any deficits in functionality of the code (or even bugs) that arise when converting large libraries to Javascript?
I do not have access to the original source code of the library and thus cannot rewrite it myself in Javascript.
Further Details:
- The C++ Library will be used to perform encryption and decryption as well as contact a server for information. Note: The library itself must be executed on the client side.
- If C++ isn't viable, I have the option of using JNI to call C++ from a java wrapper application. Is there a way to execute Java code from the client side via the browser?
I apologize for lack of source code. I'm still at the planning stage of this project and I've been tearing my hair out trying to find a solution that fits the criteria.