Compiling and serving the result

To compile the code, ensure that you're in the /chapter-06-interact-with-js folder and run the following command:

emcc js-with-glue.c -O3 -s WASM=1 -s MODULARIZE=1 -o js-with-glue.js

Once complete, run the following command to start your local server:

serve -l 8080

Open up a browser and navigate to http://127.0.0.1:8080/js-with-glue.html. You should see something like this:

Glue code running in the browser

If you press the Pause button, the caption on the button should change to Start, the text next to Status should change to Paused, and the rectangle should stop moving.

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

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