Skip to content
Some example code for the Google I/O '19 session: WebAssembly for Web Developers
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
HelloWorld-Minimal.html
HelloWorld.c
HelloWorld.html
HelloWorld.js
HelloWorld.wasm
README.md

README.md

WebAssembly For Web Developers

Code for the itenium blog post on the Google I/O '19 talk by Surma Surma and Deepti Gandluri.

HelloWorld example for running C in the browser using WebAssembly and Emscripten.

Windows SDK Installation

Install the Emscripten SDK

git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
.\emsdk.ps1 install latest
.\emsdk.ps1 activate latest
emsdk_env.bat

Compilation

emcc HelloWorld.c -s WASM=1 -o HelloWorld.html

Run generated wasm

npx http-server

And open browser:

  • HelloWorld.html: The initially generated Html file
  • HelloWorld-Minimal.html: The minimal required Html file

Or with emrun which comes with the SDK:

emrun HelloWorld.html
You can’t perform that action at this time.