1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Course Overview: Using WebAssembly with Rust

    Nik GrafNik Graf
    webpackwebpack
    rustRust
    javascriptJavaScript

    The goal of this course is to explain how to setup a project using JavaScript and WebAssembly with Rust.

    We start out with building our first WebAssembly module and loading it. Then we gradually build up until to a point where we use wasm-bindgen to invoke functions and pass data between JavaScript and Rust without a hassel.

    Further we explore various tools like wasm-pack to build our Rust code with ease and use them in combination with Node or Webpack.

    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Transcript

    Transcript

    Instructor: 00:01 WebAssembly defines a binary format and a corresponding Assembly-like text format for executable code that can run in web pages, and that with a near-native performance. It is also designed to run alongside Javascript, allowing both to work together.

    00:18 WebAssembly's major goal is to allow developers improving the performance of certain parts of their application to, in the end, improve the user experience. The best part, WebAssembly is a standard, and supported by all major browsers.

    00:35 While many languages still work out a compilation story to WebAssembly, Rust is ready for prime time. Rust is a relatively new language, and a great replacement for C and C++. In addition to that, the Rust WebAssembly team is working already on sophisticated tools, like wasm-bindgen, to make the interoperability seamless.

    01:00 In this course, we start from the beginning, demonstrate how to load a module, and then gradually build up until to a point where we use wasm-bindgen to invoke functions and pass data between Javascript and Rust without a hassle.

    01:16 Further, we explore various tools, like wasm-pack, for example, to build our Rust code with ease, and use them in combination with Node or webpack. I hope you enjoy this course, and I would appreciate your feedback.

    Discuss

    Discuss