Skip to content

Repository files navigation

WebAssembly Examples

This repository contains WebAssembly examples for an article I published on my blog (French):

Examples

Name Description Online Demo
01 - Hello World A simple "hello world" WebAssembly program Demo
02 - Function Call How to call WebAssembly functions from JavaScript Demo
03 - Pointers and Arrays how to use pointers and how to pass arrays to a WebAssembly function Demo

Benchmarks

Name Description Online Version
bench 01 - Hue shift Mesure the speed difference between a pure JavaScript and a WebAssembly versions of a hue shift on a canvas Online
bench 02 - Hue shift - Shared buffer Mesure the impact on the speed of the memory allocation calls Online
bench 03 - Hue shift - Image size Mesure the impact on the speed gain of the quantity of data passed to WASM Online
bench 04 - Hue shift - Signle Function Same as the first benchmark, but implemented as a single function Online

License

The examples in this repository are licensed under WTFPL unless otherwise stated:

        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.

Contributors

Languages