WebAssembly reminds me of Java Applets and Macromedia Flash
Published: 2023-04-11 12:45:47

---
title: WebAssembly reminds me of Java Applets and Macromedia Flash
published: true
date: 2023-04-08 11:45:36 UTC
tags: 
canonical_url: https://blog.chetanmittaldev.com/webassembly-reminds-me-of-java-applets-and-macromedia-flash
---

![Web Assembly Featured](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rk3tbaj8e0cuaadt8g1d.jpg)

Rust programming language is meant to write software for [low-powered hardware devices](https://blog.chetanmittaldev.com/10-best-use-cases-of-rust-programming-language-in-2023), the majority of which include IOT devices, embedded devices such as industrial machines, robotic devices, etc.

WebAssembly is a virtual machine (a software program) that is inbuilt into modern browsers, such as Chrome, Firefox, Safari, Edge, etc., to download and execute a binary file(s) (a compiled software program specified in the `<script>` tag in your HTML file) inside the browser.

A majority of WASM software programs are written in the Rust programming language. Though these can be written in C/C++ and Ruby-Lang too.

See the diagram below:-
![wasm-diagram](https://cdn.hashnode.com/res/hashnode/image/upload/v1680952481038/2b7803d0-0aad-43ea-88f5-6ee1544a7fac.jpeg)

WASM binary files are included in the HTML files the same way Javascript files are included inside a <script> to tell your browser that there is a web-assembly file that it needs to download and execute.

<script src="mymodule.wasm"></script>

Unlike Javascript which is interpreted on the run, from the source file, without any compiling; WASM binaries are pre-compiled files meant for fast execution and safety.

Java Applets and Adobe Flash were the same, a software program pre-compiled into a binary file running within the browser.

And similar to WASM binaries needing a software program in the browser to get downloaded and executed, both the Java Applets and Adobe Flash needed a browser plugin to get downloaded and executed within the browser.

[https://steveklabnik.com/writing/is-webassembly-the-return-of-java-applets-flash](https://steveklabnik.com/writing/is-webassembly-the-return-of-java-applets-flash)

During my early days in software programming, I built a few websites based on Java Applets and I seriously remember the nightmares I used to have while debugging those.

[https://stackoverflow.com/questions/868111/how-do-you-debug-java-applets](https://stackoverflow.com/questions/868111/how-do-you-debug-java-applets)

In 2023, I use either Ruby or JavaScript for building software applications, using [VIM](https://www.vim.org/) and [Visual Studio Code](https://code.visualstudio.com/), and both programming languages are really easy to debug on the fly than C/C++ and Java, and Rust.

I wouldn't definitely want to go back to the old days of having debugging nightmares and waiting hours while my Rust or C/C++ files for WASM are getting compiled.

[https://media.giphy.com/media/tXL4FHPSnVJ0A/giphy.gif](https://media.giphy.com/media/tXL4FHPSnVJ0A/giphy.gif)

I would say, using WASM would make more sense than JavaScript only where there is a need for a CPU-intensive software program execution because of being written in Rust and compiled.

The best examples could be:-

- Games inside the browser

- Image, audio, and video editing inside the browser

- Machine learning computations inside the browser

- Etc

Do you have any other examples where WASM could be used best? Please comment.