Join egghead, unlock knowledge.

Want more egghead? It's 45% off for a limited time only!

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock All Content for 45% Off

Already subscribed? Sign In

Save 45% for a limited time.

Get access to all courses and lessons on egghead today.

Autoplay

    Install Binaryen and the WebAssembly Binary Toolkit (WABT)

    Guy BedfordGuy Bedford

    In this lesson we cover the install process for Binaryen (http://github.com/WebAssembly/binaryen) to get the s2wasm binary and WABT (https://github.com/WebAssembly/wabt) to get the wast2wasm binary.

    Prerequisites are cmake (https://cmake.org/download/), XCode CLI tools on Mac, or Visual Studio on Windows.

    javascriptJavaScript
    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Transcript

    Transcript

    00:00 To get the .s to .asm tool, I'm going to clone and build binaryen from GitHub. In the binaryen folder with CMake installed, we then run CMake., and when that's ready, we run CMake -- build. to build the current folder. For Windows users, if you've installed CMake and have the Visual Studio build tools, the same sort of process should work.

    00:22 To build the WebAssembly Binary Toolkit, I'm going to clone from GitHub. We need to add this recursive flag, when we do that clone, to make sure we include the sub modules. Once that's downloaded, it's roughly the same build process. Except this time, I'm going to create a build folder, running CMake within it.

    00:38 I'm going to add the CMake EXECUTABLE_OUTPUT_PATH flag to output our executable binaries into the out folder. We run that against the lower folder source. Then we run CMake -- build. to complete the build into the output path. The build folder can then be removed afterwards.

    Discuss

    Discuss