JSFoo: round the year submissions

JSFoo: round the year submissions

Submit talks on JavaScript and full stack engineering round the year

Ankur Sethi

Ankur Sethi

@s3thi

Generating Fractals in the Browser With Rust and WebAssembly

Submitted Jun 29, 2018

WebAssembly is a low-level instruction format designed to be a compilation target for systems programming languages such as C, C++, and Rust. Code compiled to WebAssembly executes at near-native speeds, allowing you to write performance-critical parts of your JavaScript application in a lower-level language for a significant performance boost.

In this talk, I will walk you through writing an application that generates a Mandlebrot fractal in the browser. I’ll use React for building the user interface, and Rust for generating the fractal.

Outline

WebAssembly is a low-level instruction format designed specifically to be a compilation target for systems programming languages. It is currently supported across all modern browsers, including Chrome, Firefox, Edge, and Safari. This gives us another method for optimizing and speeding up our Web applications by re-writing their performance-critical parts in a language designed to prioritize raw execution speed.

Rust is one such language. It is a safe, concurrent, and fast programming language developed by Mozilla for the Servo browser engine. Designed as a practical replacement for C and C++, it’s used in production as a part of Firefox’s rendering pipeline. Other users of Rust include Figma, Deliveroo, and Microsoft.

In this talk, I will walk you through writing an application that generates a Mandlebrot fractal in the browser. I’ll use React for building the user interface, and Rust for generating the fractal.

Here is an outline of my talk:

  • What is the Mandlebrot set? How do I render one?
  • What is WebAssembly? What is it good for?
  • How do I run WebAssembly in my browser?
  • What is Rust?
  • How do I compile Rust to WebAssembly?
  • How do I write the performance-critical part of my JavaScript program in Rust?
  • Why can’t I write my entire application in Rust?

You don’t have to be familiar with either Rust or WebAssembly to attend this talk.

Speaker bio

Ankur Sethi leads the Web Engineering team at Uncommon in Bangalore. He builds applications with JavaScript, TypeScript, and (sometimes) Rust. He has terrible taste in music, which he inflicts on unsuspecting strangers if handed the AUX cord at parties.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

JSFoo is a forum for discussing UI engineering; fullstack development; web applications engineering, performance, security and design; accessibility; and latest developments in #JavaScript. Follow JSFoo on Twitter more