Introduction to WebAssembly
WebAssembly, often abbreviated to Wasm, is considered a game-changer for web development. It’s an open standard that enables high-performance execution of compiled code directly in the browser. You can think of it much like an assembly language for a conceptual machine. Yet, this machine is different from any hardware machine that takes code with the help of an executable file format to perform a task. WebAssembly’s machine is virtual.
WebAssembly isn't a programming language you are going to write - but other languages (like C, Rust, or C++) are going to compile to in order to have highly performant (near native) speed in the browser. That's why we are using this simple C++ "Hello world!" example. If you are into web development, imagine the back-end code for your web application executing almost as fast as your front-end JavaScript code. Sounds incredible, right?
It also opens the web platform to a multitude of languages other than JavaScript. This is exhilarating because it expands the capabilities of the web for software engineering and provides an effective alternative to JavaScript, which is currently the primary language of the web. In our subsequent screens, we dive into understanding how to set up the environment, creating Wasm modules, and leveraging WebAssembly for speeding up your application. So let's embark on this journey.
xxxxxxxxxx
using namespace std;
int main() {
cout << "Hello WebAssembly World!";
return 0;
}