Skip to content

Instantly share code, notes, and snippets.

@s3ththompson
Last active September 20, 2016 16:25
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s3ththompson/7b58b492b02703a0424b to your computer and use it in GitHub Desktop.
Save s3ththompson/7b58b492b02703a0424b to your computer and use it in GitHub Desktop.
WebAssembly "Hello World" in V8

WebAssembly "Hello World" in V8

🏁 This document aims to show the end-to-end WebAssembly toolchain working in the V8 engine, starting with a "hello world" C source file and ending with code executing at native speed in V8.

This guide is now out of date. See Step by Step on the WebAssembly site for up-to-date instructions.

@rumkin
Copy link

rumkin commented Mar 31, 2016

Try to build on Ubuntu. Got error on building clang:

-- No build type selected, default to Debug
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/gcc
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/usr/bin/gcc" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: /out/CMakeFiles/CMakeTmp



  Run Build Command:/usr/sbin/ninja cmTryCompileExec2172181018

  die: error: unable to read configuration filelog: reading configuration
  file: cmTryCompileExec2172181018







  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:54 (project)


-- Configuring incomplete, errors occurred!
See also "/out/CMakeFiles/CMakeOutput.log".
See also "/out/CMakeFiles/CMakeError.log".

@gregsimon
Copy link

Seth, I think you want to replace the wasmate.py with s2wasm add.wask > add.wast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment