Are you a beginner in programming or you have experience in programming
but don't know about the WebAssembly the Wasm thing?
This video is for you and stick with me at the last
because I'm going to share one amazing destination, one amazing resource
to learn the WebAssembly, or I can say
getting started with WebAssembly, the Wasm thing.
But what is WebAssembly and which company is using it?
Why you should here about the WebAssembly everything in this episode and Wasm
is here with us to change
how we interact with the application in the browser.
Isn't it really amazing?
Let's now start this video
so let's break down.
WebAssembly comes with web and Assembly,
web we already know and you may have heard about the Assembly
languages, assembly languages also called ASM.
And with the web it's called Wasm So WASM
so WebAssembly is also known as WASM now comes to the Assembly Language.
Assembly languages are low level programming language
and we just need to convert it into the machine code and that's done
and that's why these assembly languages are super powerful and extremely fast.
We can write these kind of things
with the use of C, C++,
maybe rust C sharp but all these languages
are not compatible with the web or I can say with the browser.
So in browser, only one thing is there JavaScript,
JavaScript is the dominator,
or I can say only one major player in the web thing.
So browser can only understand JavaScript.
Now, this is actually a problem
because in JavaScript there are a lot of steps
to convert the JavaScript code into the machine readable code.
So with the JavaScript code, we need to parse it, compile it,
and then we will be able to use it at the browser.
Now, what if with somehow
we will be able to run the C++,
the rust code into the browser?
And when I say into the browser, I'm not saying like it's
going to replace the JavaScript it's not going to send any request,
it's not going to use Axios or Fetch.
I'm talking about the CPU intensive task browser.
The JavaScript in the browser cannot or I can say
not efficiently use your CPU to do the CPU
intensive task just like a game,
just like rendering a 3D model inside the browser.
We can not do that.
Efficiently with just with the use of JavaScript.
So what happen with the Wasm the WebAssembly
with these languages like the rust, C++ and C sharp?
There is a way we can convert these languages, code
into Wasm the WebAssembly code and since WebAssembly code
is directly going to talk to the machine, we can easily run
that code on the browser.
So we need a combination of JavaScript
and the WebAssembly to actually do our task.
So once we have the code written
in rust, C++ or in C sharp
converted into Wasm the WebAssembly,
then we can use the JavaScript to read that Wasm code
the WebAssembly code and luckily we have a way or a function
which can easily read the WebAssembly code from the JavaScript.
So JavaScript can read and execute that code.
So suppose I want to render a 3D model.
I can just request my JavaScript and JavaScript will say that.
Okay, do I have a renderer
so Renderer is written in rust,
convert it into the assembly language or Wasm the WebAssembly languages
and JavaScript will then read or instructed that WebAssembly code
to actually do the task in the in the browser.
And this is the real power of WebAssembly
Everyone should have the knowledge of WebAssembly then the question
comes in my mind, other than 3D rendering
where I can use this Wasm thing
so you can use to process the audio,
the video to have a game like
just write game directly into the browser, you can create a music application,
as I said, rendering the audio, processing the audio,
you can create a collaborative application.
You may have seen something like Google Sheet
where you can actually actually edit two or three people directly can edit
the google sheet directly at the same time and that's really powerful.
So these kind of things you can also create
because all the heavy task can be handled by the Wasm thing not the JavaScript
and overall, any CPU intensive task
you can easily do with this Wasm I told you that I'm going to tell you
which company is really using this WebAssembly.
WebAssembly is heavily used in Figma.
If you are a developer, you already know about the figma.
It has disrupted the Photoshop Adobe Market,
and that is possible with the help of this web assembly thing.
Other than that unity, Google
Earth and many other great, great browser
level applications are using this WebAssembly.