Pixel manipulation using Rust, WebAssembly, Node.js and Webpack.

moi, convoluting

Convolution is the process of transforming an image by multiplying each of its pixels by a kernel. Depending on the kernel used, different effects such as blurring, sharpening, embossing, etc, can be achieved.

We will come back to the implementation of convolution later on, but first let’s create a project where we can play around with Rust and WebAssembly, and easily embed a generated wasm file in a web app.

The Setup

Let’s start with the prerequisites for Rust and WebAssembly. Install Rust and wasm-pack. Then install cargo-generate and create a project called convoluted-mirror:

Roberto Torres

Front-end developer. Love graphics and animations.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store