GNU libgcrypt and (OTR) Off-the-Record Messaging compiled to javascript using Emscripten
HTML JavaScript C Shell Makefile Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

gcrypt and otr in javascript

A build script to compile GNU Libgcrypt and Off-the-Record Messaging using the awsome Emscripten cross-compiler.

Building the libraries

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.

  ./ "/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

  • OTR4-em Off the Record Messaging npm module.
  • otrTalk P2P Off the Record chat application.