A build script to compile GNU Libgcrypt and Off-the-Record Messaging using the awsome Emscripten cross-compiler.
Setup Emscripten on your system.
Run the build script (it will try to find emscripten in the following locations; path specified on the command line, EMSCRIPTEN_ROOT environment variable, and finally in from the config file ~/.emscripten.) This will configure and compile the libraries into llvm bitcode.
./build-libs.sh "/path/to/emscripten"
We can now compile C code that links to these libraries into javascript.
make libotr-test
node tests/libotr-test
run a libgcrypt test:
make test run-test
To build and run all the libgcrypt tests:
make test-all run-test-all
To run the benchmark
make benchmark.js
node tests/benchmark.js
See Also