@@ -284,6 +284,7 @@ <h1><a name="aceinstall">Building and Installing ACE</a></h1>
284284< li > < a href ="#win32 "> Windows (including MinGW and Cygwin)</ a > </ li >
285285< li > < a href ="#vxworks "> VxWorks</ a > </ li >
286286< li > < a href ="#android "> Android</ a > </ li >
287+ < li > < a href ="#emscripten "> Emscripten WebAssembly</ a > </ li >
287288</ ul >
288289
289290< h2 > General Rules</ h2 >
@@ -1823,7 +1824,7 @@ <h3><a name="android-openssl">OpenSSL</a></h3>
18231824 OpenSSL. On Android, OpenSSL isn't part of the NDK Library and Android
18241825 preloads the system SSL library (either OpenSSL or BoringSSL) for the Java
18251826 Android API. This means OpenSSL < b > MUST</ b > be statically linked to avoid
1826- conflicts with the almost certianly incompatible system SSL library.
1827+ conflicts with the almost certainly incompatible system SSL library.
18271828
18281829 To build OpenSSL for Android, please read < code > NOTES.ANDROID</ code > that comes
18291830 with OpenSSL's source code. The static libraries will used if the shared
@@ -1833,6 +1834,43 @@ <h3><a name="android-openssl">OpenSSL</a></h3>
18331834 building OpenSSL.
18341835</ p >
18351836
1837+ < hr align ="left " width ="50% ">
1838+
1839+ < h2 > < a name ="emscripten "> Building ACE for Emscripten WebAssembly</ a > </ h2 >
1840+
1841+ < p > < b > NOTE: This has only been tested on Linux with NodeJS 16.18.</ b > </ p >
1842+
1843+ < a href ="https://emscripten.org/ "> Emscripten</ a >
1844+ is a LLVM toolchain that allows compiling C++ to
1845+ < a href ="https://en.wikipedia.org/wiki/WebAssembly "> WebAssembly</ a >
1846+ that can be ran on a web browser or < a href ="https://nodejs.org "> NodeJS</ a > .
1847+
1848+ < h3 > Building</ h3 >
1849+
1850+ < ol >
1851+ < li > Download and setup < a href ="https://emscripten.org/docs/getting_started/downloads.html "> emscripten</ a > .</ li >
1852+ < li > Run < code > source emsdk_env.sh</ code > in < code > emsdk</ code > .</ li >
1853+ < li > Make sure MPC is available and < code > MPC_ROOT</ code > is set.</ li >
1854+ < li > Configure ACE:
1855+ < ol >
1856+ < li > < code > $ACE_ROOT/bin/MakeProjectCreator/config/default.features</ code >
1857+ should contain < code > no_cxx11=0</ code > </ li >
1858+ < li > < code > $ACE_ROOT/include/makeinclude/platform_macros.GNU</ code > should contain
1859+ < code > include $(ACE_ROOT)/include/makeinclude/platform_emscripten.GNU</ code > </ li >
1860+ < li > < code > $ACE_ROOT/ace/config.h</ code > should contain
1861+ < code > #include "config-emscripten.h"</ code > </ li >
1862+ < li > < code > cd $ACE_ROOT/ace && mwc.pl -type gnuace .</ code > </ li >
1863+ </ ol >
1864+ </ li >
1865+ < li > Build ACE: < code > cd $ACE_ROOT/ace && make -j4</ code > </ li >
1866+ </ ol >
1867+
1868+ < h3 > Running Tests</ h3 >
1869+
1870+ < pre class ="indent ">
1871+ DOC_TEST_1=NODEJS NODEJS_OS=local ./run_test.pl -Config STATIC -Config NODEJS
1872+ </ pre >
1873+
18361874< hr >
18371875< h1 > < a name ="svcsinstall "> Building and Installing ACE Network Services</ a > </ h1 >
18381876
0 commit comments