[sword-devel] Sword as a WASM library

Kovács Zoltán kovzol at gmail.com
Sat Jan 15 06:05:11 EST 2022


> I will send you a detailed description on how one could easily build it
> from scratch (in a different email).
>

After some unsuccessful attempts to simplify the process, this is how it
seems to be the easiest way for the moment (see also
https://github.com/kovzol/bibref/blob/master/.github/workflows/build.yml#L27-L41
for a working GitHub action inside an application based on Sword), in a
shell under Linux (I used Ubuntu 21.10, but this should be irrelevant):

git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 2.0.22
./emsdk activate 2.0.22
cd ..
. emsdk/emsdk_env.sh
git clone https://github.com/kovzol/crosswire-sword-mirror
cd crosswire-sword-mirror
mkdir build
cd build
sudo apt install subversion # This is required, otherwise the cmake step
will fail.
emcmake cmake ..
emmake make sword_static

An application based on the WASM build of libsword.a can be compiled and
linked as shown in https://github.com/kovzol/bibref/blob/master/Makefile.
The steps are explained in the beginning of this Makefile, including the
compilation steps of libsword.a as well.

I hope this helps. ;-)

Best, Zoltan
--------- k�vetkez� r�sz ---------
Egy csatolt HTML �llom�ny �t lett konvert�lva...
URL: <http://crosswire.org/pipermail/sword-devel/attachments/20220115/7e8cd73d/attachment.html>


More information about the sword-devel mailing list