Examples of using glue code

Let's write some code that utilizes all of these features. In this section, we will modify the code we used in the Compiling C without the glue code and Fetching and instantiating a Wasm file sections of Chapter 5, Creating and Loading a WebAssembly Module. This was the code that displayed a moving blue rectangle on a red canvas and could be paused and restarted with the click of a button. The code for this section is located in the /chapter-06-interact-with-js folder in the learn-webassembly repository. Let's start by updating the C code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset