Member-only story
WASM+Docker Hello World
WASM Hello World App with Rust and Docker Desktop
WebAssembly (WASM) is a binary instruction format for a stack-based virtual machine that is designed to be fast and efficient. It is a low-level assembly-like language that runs in the browser and provides a way to execute code at near-native speeds. WASM is supported by all major web browsers, including Chrome, Firefox, Safari, and Edge.
WebAssembly System Interface (WASI) is an interface that allows WebAssembly code to access the underlying operating system and file system. It provides a standardized set of system calls for WebAssembly modules to interact with the host environment. This allows WebAssembly code to be run in the backend.
In short, if WASM is JavaScript, WASI is Node.js.
Another important aspect of WASM is that it is language-agnostic, which means that code written in a variety of programming languages, such as Rust, C++, or C can be compiled to WASM and run in the browser. This provides developers with more options for building web applications and allows them to take advantage of the strengths of different languages.
TL;DR
In this piece, we’re going to create a Hello World app using Rust, compile it into a WASM binary, and run it using Docker Desktop.
