Running native code in the browser using WebAssembly : demonstration
Kapri, Yakub (2023)
Kapri, Yakub
2023
All rights reserved. This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2023060822971
https://urn.fi/URN:NBN:fi:amk-2023060822971
Tiivistelmä
This thesis aims to demonstrate the potential of WebAssembly as a powerful tool for developing web applications with native code. The thesis provides an overview of WebAssembly and its predecessor technologies and showcases the creation of a Pong game as a practical example. The logic of the game was created using C++ and compiled into WebAssembly using Emscripten.
The thesis also outlines the development workflow, including setting up the development environment, calling C++ functions from JavaScript, making changes to HTML, and the compilation process. The result of this endeavour was the successful execution of the Pong game on a web browser, utilizing WebAssembly for running native C++ code.
This thesis serves as an example for developers aiming to harness the capabilities of WebAssembly and leverage the advantage of native code to create compelling and robust web applications.
The thesis also outlines the development workflow, including setting up the development environment, calling C++ functions from JavaScript, making changes to HTML, and the compilation process. The result of this endeavour was the successful execution of the Pong game on a web browser, utilizing WebAssembly for running native C++ code.
This thesis serves as an example for developers aiming to harness the capabilities of WebAssembly and leverage the advantage of native code to create compelling and robust web applications.