Hands-On WebAssembly for C++ Programmers

Video description

Take advantage of the performance and speed of C++ directly in web browsers

About This Video

  • This practical guide will take you beyond the simple Hello World stage and you'll soon get up and running with WebAssembly by solving a real-world problem
  • Start off with the basics and rapidly move on to more advanced topics
  • Includes hands-on, practical examples to guide you through the interplay between C++ and WebAssembly and tips and tricks to optimize your application's performance

In Detail

Due to recent trends, companies are looking to design their applications live on the web. However, it's easy to grow frustrated with JavaScript, which offers limited scope for fine- tuning performance.

If you want get ahead of your competitors by working in a language you're comfortable with, one that is designed for speed? WebAssembly is your answer. Starting with first principles; you'll learn is why WebAssembly is so powerful and why C++ is a natural fit. The you'll look at compiling a program for WebAssembly using C++.

This course looking provides code examples, rather than slides so that you can really delve into the depths of WebAssembly. Allowing you to go beyond simple toy examples and learn about how real programs compile to WebAssembly.

You'll find out that not everything works out right the first time, and it's just as important to learn how to debug and profile your programs.

By the end of this course, you will have gained all the skills you need to get a speed advantage over pure JavaScript applications, leaving your competitors behind.

Publisher resources

Download Example Code

Table of contents

  1. Chapter 1 : Getting Started with WebAssembly
    1. Course Overview 00:03:35
    2. Understanding WebAssembly and C++ 00:06:25
    3. Seeing WebAssembly in Action 00:10:05
  2. Chapter 2 : Running Our First C++ Application in the Browser
    1. Setting Up Your Toolchain 00:06:03
    2. Running Your First C++ Application on the Web 00:07:09
    3. Using the C++ Compiler to Generate WebAssembly 00:04:22
    4. Calling C++ Functions with JavaScript 00:07:22
    5. Passing Complex Data with Embind 00:08:53
  3. Chapter 3 : Getting Under the Hood of WebAssembly
    1. Interacting with the Browser 00:04:15
    2. Exploring the Syntax of WebAssembly 00:08:38
    3. Understanding the Memory Model 00:06:19
    4. Catching WebAssembly Traps 00:04:28
    5. Integrating WebAssembly Modules 00:04:26
  4. Chapter 4 : Using WebAssembly System Libraries
    1. Interacting with System Libraries 00:03:46
    2. Handling Input and Output 00:08:46
    3. Telling Time Through WebAssembly 00:03:16
    4. Performing in Parallel by Threading 00:06:10
    5. Communicating with Other Programs over the Network 00:06:28
  5. Chapter 5 : Working with Computer Hardware in the Web
    1. Converting the Game to SDL 00:07:54
    2. Drawing Our Game in WebAssembly 00:06:49
    3. Handling Keyboard and Mouse Inputs 00:04:12
    4. Experimenting with WebGL 00:04:58
    5. Wrapping Applications with Windowing 00:03:30
  6. Chapter 6 : Making Music in the Browser by Integrating Audio
    1. Understanding Audio Processing in WebAssembly 00:06:24
    2. Playing Simple Sounds in SDL 00:05:25
    3. Integrating Sounds into Our Applications 00:03:05
    4. Providing Music in Our Applications 00:05:10
  7. Chapter 7 : Debugging Techniques in WebAssembly
    1. Exploring Web Debugging 00:07:32
    2. Debugging WebAssembly 00:08:05
    3. Protecting Your Code with Debug Capabilities 00:05:12
    4. Profiling WebAssembly 00:05:55
    5. Tracing Execution in WebAssembly 00:06:23
    6. Course Review 00:03:21

Product information

  • Title: Hands-On WebAssembly for C++ Programmers
  • Author(s): Patrick Viafore
  • Release date: April 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781839217753