Skip to content

AudYoFlo: Building for Webbrowser Webassembly

jvxgit edited this page Jun 17, 2024 · 4 revisions

The AudYoFlo system can be built also for Webassembly to run in a webbrowser. This requires the Emspcripten SDk to be installed at first. In this chapter, we will demonstrate the build on a MS Windows PC.

Installation of the EMSDK

For the installation, you need to obtain the SDk from here:

https://github.com/emscripten-core/emsdk.git

At first, we need to populate an SDK folder,

grafik

git clone https://github.com/emscripten-core/emsdk.git

Then, we can check if the emsdk is ready to be used:

grafik

Finally, we try to run an update of emsdk and finally end up with a gut pull:

grafik

Now, we install and activate the emsdk tools by

emsdk install latest
emsdk activate latest

grafik

grafik

The emsdk is now ready to be used.

Building AudYoFlo for Emscripten

Once the emsdk is ready we can use the Cmake based configuration and build process as described for Windows. Indeed, the Emscripten build is a specific variant of a cross compile process. At first, we start by creating a build output folder and copy the build script and module configuration file from <AudYoFlo>/build-scripts/webassembly/rt,

grafik

Building the Build Tools

At first, we need to build the AudYoFlo build tools. On Windows, we start a Visual Studio command shell and run the command

compiled.bat rt-bt

grafik

grafik

This step is a native compilation to allow running the AudYoFlo tools on the host PC during the next cross compile steps.

Starting the Emscripten SDK build environment

Now, we need to switch the build environment by running the emsdk script,

c:\sdks\emsdk\emsdk_env.bat

grafik

Building the AudYoFlo Source

Finally, we can run the compile script which now involves the Emscripten build process as usual:

compiled.bat cc && compiled.bat rt

grafik

Note that there is only one real project for AudYoFlo in a web browser at the moment in <AudYoFlo>/sources/wp-modules/simpletest.

Back

Clone this wiki locally