WebAssembly First Steps
Safe, Fast, and Portable Software Development
Topic: Web Platform
What emerges is a world where you will be able to choose your programming language and have the subsequent code be able to run with near native speed on just about any platform out there. It is the fulfillment of a promise we were given many years ago but with the experiences we have had in the meantime to make it more likely to succeed.
We will focus on the use of WebAssembly in the browser, but we will also give the attendees a peak into what is happening with respect to WebAssembly out of the browser as well.
What you'll learn-and how you can apply it
By the end of this live, hands-on, online course, you’ll understand:
- What WebAssembly is and how it works
- How it will impact software development in general
- How it will impact Web development in particular
- How it will expand what is possible in Web development environments
And you’ll be able to:
- Explain how WebAssembly allows you to develop fast, safe, portable code that can be deployed in a Web environment
- Build WebAssembly-enabled applications that run in the browser
- Create WebAssembly modules in different languages
- Incorporate the tooling (compilers, builders) into your builds
- Run applications such as sqlite in the browser
This training course is for you because...
- You’re an application developer interested in migrating your existing desktop and command line applications into the Web environment
- You’re in tech leadership and want to learn how WebAssembly will improve productivity, lower costs, increase security and extend the value lifetime of written code so it can be used more widely and for longer durations
- You want to be prepared for the development environments of the future
- Prerequisites What prior knowledge or experience is necessary?
- Familiarity with the basics of a language like C or Rust will be helpful but not a strict requirement
- There is no special setup, but in order to take part in the course exercises (optional) you will need a modern browser that supports WebAssembly https://caniuse.com/ - search=WebAssembly and have the ability to run a small web server via Python, nginx, etc.
About your instructor
Brian Sletten is a liberal arts-educated software engineer with a focus on using and evangelizing forward-leaning technologies. He has a background as a system architect, a developer, a security consultant, a mentor, a team lead, an author, and a trainer and operates in all of those roles as needed. His experience has spanned the online game, defense, finance, academic, hospitality, retail, and commercial domains.
He has worked with a wide variety of technologies such as network matrix switch controls, 3D simulation/visualization, Grid Computing, P2P, and Semantic Web-based systems. He has a B.S. in Computer Science from the College of William and Mary. He is President of Bosatsu Consulting, Inc. and lives in Los Angeles, CA. He focuses on web architecture, resource-oriented computing, social networking, the Semantic Web, scalable systems, security consulting, and other technologies of the late 20th and early 21st Centuries.
The timeframes are only estimates and may vary according to how the class is progressing
Introduction (15 minutes)
- Presentation: We will establish the main goals for the WebAssembly initiative.
Asm.js (15 minutes)
- Presentation: We will discuss the path to WebAssembly through Mozilla’s asm.js proof of concept.
- Exercise: We will ask the students to run an asm.js application in their browser
WebAssembly Basic Concepts (20 minutes)
Introduction to C (10 minutes)
- Presentation: We will cover an extremely basic overview of C. Just enough to make the next section make sense.
- Break (5 minutes)
WebAssembly and C (20 minutes)
- Presentation: We will discuss the process of converting a C application into a WebAssembly application.
Introduction to Rust (10 minutes)
- Presentation: We will cover an extremely basic overview of Rust. Just enough to make the next section make sense.
WebAssembly and Rust (20 minutes)
- Presentation: We will discuss the process of converting a Rust application into a WebAssembly application.
WebAssembly Memory (15 minutes)
- Presentation: We will introduce the notion of WebAssembly Memory instances and how they allow us to emulate pointers and shared memory.
- Exercise: We will ask the students to pass a WebAssembly Memory from the host environment into their WebAssembly module and use it to produce a result.
- Break (5 minutes)
WebAssembly Tables (15 minutes)
- Presentation: We will introduce the notion of WebAssembly Table instances and how they allow us to provide dynamic linking between modules.
- Exercise: We will ask the students to pass a WebAssembly Table from the host environment into their WebAssembly module and use it to produce a result.
- Break: 5 min
WebAssembly and wasm-bindgen (20 minutes)
- Exercise: We will ask the students to build a Rust application that invokes browser behavior through wasm-bindgen-generated interfaces.
The Future of WebAssembly (20 minutes)
- Presentation: We will discuss the impending future of WebAssembly including WASI, WAPM, the Interfaces spec and the Bytecode Alliance.
- Exercise: We will have the students run a database in the browser.