a-installation-tool-setup

A Installation & tool setup

 

This appendix covers

  • Installing Python
  • Starting a local web server using Python
  • Checking to see if the WebAssembly Media Type is configured for Python and, if not, how to configure it
  • Downloading and installing the Emscripten SDK
  • An overview of the WebAssembly Binary Toolkit

In this appendix, you’ll install and set up all tools needed to follow along with the examples in this book. The main tool that you’ll need is Emscripten. Originally created to transpile C and C++ code into asm.js, it has since been modified to also compile code into WebAssembly modules.

A.1   Python

You’ll need to have Python installed on your system to run the Emscripten SDK installation. The minimum version of Python that’s needed is 2.7.12. You can check to see if Python is already installed, and what version it is, by running the following command in a console window:

python -V

If Python is installed, you should see a message similar to the one shown in figure A.1.

Figure A.1 Python 2.7.13 is installed

If Python is not installed, the installation can be downloaded from the following website: https://www.python.org/downloads/

If you’re using a version of Linux that has APT, Python can also be installed by running the following command at a terminal window:

sudo apt install python-minimal

A.1.1   Running a local web server

A.1.2   The WebAssembly Media Type

A.2   Emscripten

A.2.1   Downloading the Emscripten SDK

A.2.2   If you’re using Windows

A.2.3   If you’re using a Mac or Linux

A.2.4   Working around installation issues

A.3   Node.js

A.4   WebAssembly Binary Toolkit

A.5   Bootstrap