[sword-devel] SWORD + Emscripten = sword.js?

Stephan info at tetzels.de
Wed Mar 27 21:31:05 MST 2013


Hi,

I'm still looking for a way to access the sword modules in Javascript to 
build a sword webapp, that runs in a browser and on modern smartphones. 
Last week I've heard from Emscripten (www.emscripten.org),  LLVM to JS 
compiler. The goal is to "translate" C/C++ code to Javascript.

I've tried to compile libsword and my c++ plugin (that I use in BibleZ 
HD, the webOS app), but with no success. The compilation works fine, but 
I couldn't receive a list of modules or access them. I think emscripten 
has some problems with std::map 
(https://groups.google.com/forum/?fromgroups=#!topic/emscripten-discuss/AjJ5N5QfWag)

To access a c++ lib the recommend way is to write a c wrapper. They have 
a bindings generator for this, but is still very experimental.

I'll try to clean up my code and add some comments and upload it to 
github, so somebody can play with it.

Emscripten is a very interesting project and maybe a way to build a 
Javascript lib for sword. The other way is to build one from scratch 
(there is zlib support for JS or nodejs), like the guy from 
cross-connect did for C#.

Best Regards,
Stephan



More information about the sword-devel mailing list