Alex begins his talk by pointing out how web content has become massively efficient; this is because it solves three problems:
Applications are kind of an elevated form of content. They tend to be more experiential, dynamic, and interactive. Alex points out the definition of ‘application’ from Wikipedia, which states that applications are software that is designed to perform a group of coordinated functions tasks and activities for the benefit of users. Despite all progress, mobile apps are still hugely inefficient to create, distribute, and use.
Its distribution is generally in the hands of the duopoly, Apple and Google. The unification is generally handled through third-party frameworks such as React Native, or Xamarin. User experience on mobile apps, although performant leads to high friction as a user has to generally switch between apps, take time for it to install, load etc.
Web based applications on the other hand are quite efficient to create, distribute and use. Anybody who's got an internet connection and a browser can go through the web application. For web applications, unification happens through standards, unlike frameworks which is more efficient. User experience is also quite dynamic and fast; you jump right into it and don't have to necessarily install anything.
Although mobile applications are a bit inefficient, they bring certain features:
In order to get the best of both worlds, Alex suggests the following steps:
Alex proceeds to talk about Woz, which is a progressive WebAssembly application generator. It combines all the good things of a PWA and WebAssembly and works as a toolchain for building and deploying performant mobile apps with Rust. You can distribute your app as simply as sharing a hyperlink. Woz brings distribution via browsers, unification via web standards, and experience via hyperlinks.
Woz uses wasm-bindgen to generate the interop calls between WebAssembly and JavaScript. This allows you to write the entire application in Rust—including rendering to the DOM. It will soon be coming with ‘managed charging’ for your apps and even provide multiple copies your users can share all with a hyperlink.
Unlike all the things you need for a PWA (SSL certificate, PWA Manifest, Splash screen, Home screen icons, Service worker), PWAAs requires JS bindings to WebAssembly and to fetch, compile, and run wasm.
His talks also talked about some popular Rust-based frontend frameworks
Read Also: “Rust is the future of systems programming, C is the new Assembly”: Intel principal engineer Josh Triplett
With Woz, the goal, Alex says, was to stay in Rust and create a PWA that can be installed to your home screen. The sample app that he created only weighs about 300Kb.
Alex says, “In order to actually write the app, you really only need one entry point - it’s a public method render that's decorated wasm_bindgen. The rest will kind of figure itself out. You don't necessarily need to go create your own JavaScript file.” He then proceeded to show a quick demo of what it looks like.
Watch Alex Kehayis’s full talk on YouTube. Slides are available here.
https://www.youtube.com/watch?v=0ySua0-c4jg
Wasmer’s first Postgres extension to run WebAssembly is here!
Mozilla proposes WebAssembly Interface Types to enable language interoperability
Wasmer introduces WebAssembly Interfaces for validating the imports and exports of a Wasm module