Skip to content

How to write a WebGL application in Rust

Photo of Eddy Bruël
Hosted By
Eddy B.
How to write a WebGL application in Rust

Details

This is the first in what will hopefully be a series of workshops where we want to teach aspiring Rust programmers how they can use Rust in their own projects.

In this first workshop, we show you how you can write a WebGL application in Rust by compiling it to WebAssembly. WebAssembly is a great choice for this kind of application because it offers the advantage of having near native performance, whilst still being able to run on the web. Rust, in turn, is a great language for writing native code, because it avoids almost all memory related bugs.

We kick off the workshop by giving a very brief presentation of Makepad, a creative programming environment for Rust that we've been developing. Makepad is able to run on the web using a combination of WebAssembly + WebGL, and is thus a great example of the potential of writing WebGL applications in Rust. We'll be using Makepad for the workshop, but you can use your own tools, if you want.

After this, we start with a much simpler WebGL application, written in JavaScript. Our goal is to port part of this application in Rust, using WebAssembly. In the process, we show you how you to write bindings for WebAssembly code. After this, we discuss how you can port the rest of the application.

During the workshop, several people are available to try and answer any question you might have.

Photo of Amsterdam Rust Workshop group
Amsterdam Rust Workshop
See more events
Borges 3D
Marineterrein, Gebouw 003H, Kattenburgerstraat 7 · Amsterdam, al