Hi All!

I'm trying to use this wonderful tool to convert a C library 
(https://github.com/WhisperSystems/libsignal-protocol-c/) to JS. The 
library itself has a JS version, but it is not complete and I actually need 
some missing implementations that exist in the C version. I'm using 
emscripten v1.35 and am able to run emcc successfully on the resulting .a 
library and generate a JS file. That said, I believe that due to dead code 
elimination, I'm not seeing the particular methods I need there. I noticed 
there is the possibility to use the -s EXPORTED_FUNCTIONS flag, which is 
why I'm posting this question here.

The process I'm following is as follows:

Cloning the repo.
cd libsignal-protocol-c
mkdir build && cd build
cmake ..
emmake make
emcc src/libsignal-protocol-c.a -o libsignal-protocol.js 
-s EXPORTED_FUNCTIONS="['_group_session_builder_process_session', 
'_group_session_builder_create_session']"

The output js file does not include the aforementioned functions. Am I 
doing anything wrong? I greatly appreciate any pointers here. No warnings 
or errors are printed during compilation.

In case it helps, the functions I need are here in the original c code: 

https://github.com/WhisperSystems/libsignal-protocol-c/blob/master/src/group_session_builder.c

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to