WebAssembly via Emscripten and C Primer Tutorial

WebAssembly via Emscripten and C Primer Tutorial

WebAssembly via Emscripten and C Primer Tutorial

Have you done any web application work with a WebAssembly? It gets you being able to bring your C or C++ or Rust code into a web application. Great idea, huh?! Today we’re presenting some simple usages of a WebAssembly made via two small pieces of C code …

To get started, and going, here, we liked Compiling a New C/C++ Module to WebAssembly as far as advice goes and needed Emscripten download resources at Emscripten Download and install and CMake on our macOS local environment, allowing us to compile the html via a command such as …


emcc hello.c -o hello.html

… allowing the sftp of the html and js and wasm over to the RJM Programming public web domain, and show you, in action, today. Cute, huh, given the code is C by nature and inclination!

Word of warning with the Fibonacci code is that use of C scanf function is a little sketchy in its behaviour, hence our wrapping of the Emscripten html within an iframe, where topmost parent html explains the issue, a bit.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Installers, Operating System, Software, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>