The Complete WebAssembly Course - From BEGINNER to ADVANCED!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to the web assembly course 2024 so web assembly was Talk of the Town of 2023 and it is getting even bigger and bigger with all the fancy stuffs getting added to it in 2024 and I say Pak joined by PR W thought that this would be the perfect time to bring a web assembly course for you where we'll be talking about history of web assembly what is web assembly all the stuffs with respect to Cloud native web assembly how it works with Docker how you can use the same tooling how you can deploy applications create them OC artifacts deployed to cuties and all these stuff yeah we particularly we talk about wasm in terms of cloud native we'll also take a look at a few applications of it mainly we'll be focused on understanding the fundamentals of B assembly very well the course won't be just showing what you can do with web assembly well we'll also have some of that both of us being excited about web assembly and what it can do but the course will mainly be about answering the why question why does web assembly even exists or what kind of problems is by simply trying to solve and uh how is it doing that what is the approach to doing that you can think of it as we'll walk you through every decision with web assembly and understand why web assembly is made the way it is made and what kind of problems it's trying to solve so we are very excited for this particular course as we'll be covering everything from the introduction based Basics the terminology sandboxing the run times component model stuff the vasi stuff everything will be followed by a demo so that it's not only a theoretical introduction but it also practical introduction we'll try to cover all the aspects of it yes this is the web assembly introduction course for 2024 that you'll need to get your hands diry with web assembly and create some fancy practical applications after watching the course so we are very excited for this particular course I hope you are to to watch till the end web assembly is it web is it assembly what exactly web assembly is in this section of the course we'll be discussing all about web assembly getting the introduction and the context right so that we exactly understand why this technology exist why the terminology of web assembly exist why it was needed in the first place and then from there on we'll build up to the cloud native web assembly where we'll be deploying a simple application and a high level application onto kubernetes environment and that will be yes a web assembly application that will be deploying onto kubernetes so web assembly is it a replacement for JavaScript does it replace talker because we have been hearing so much about talker versus web assembly is it a new Java because because Java promised some of the features that we'll be discussing about web assembly as well is it a new programming language itself that we have to learn a new dimension Al together to write software what exactly web assembly is let's go down the memory lane and try to understand from the first definitions and the origins for web assembly so as you can see web assembly defines a portable size and low time efficient format and execution model specifically designed to serve as a compilation Target for web and that's exactly what web assembly is now this definition is obviously used a lot because it exactly depicts what web assembly is it is a compilation Target so there is a universal bite code that your program or the code compiles to that can run on any platform and that's what exactly defines the web assembly it's not that this whole is a concept which is super new which is like a Innovation that has never been attempted before and it's not like this has not been even discussed before so there were promises that were made prior to web assembly coming into the game doing the same thing following the same approaches there were attempts to do similar kind of things like running in the browsers the fancy codes apart from the JavaScript but those were very language specific things like it was not language agnostic so few of the examples that you might have heard is Java applets vbscript Adobe Flash you might have used a lot in the past now those were some of the similar attempts that I would say has been done in in a similar area so if you want to compare what web assembly is today like today it's a massive ecosystem there's a whole there's actually a landscape in cncf also about web assembly uh but yeah some parts bits and pieces you would have seen in Java applets VB script Adobe Flash that you might have used in the past as well now why web assembly was a success like it's not only one thing so there there are few things first it's the joint effort to make a success what does that mean is big companies coming in together thinking formulating a solution to have something Universal and putting effort in doing that things get interesting when it gets adopted as the fourth language of the web because as per w3c prior to web assembly it was only HTML CSS and JavaScript with web assembly getting into w3c and w3c making all like the standards so the belief that this technology will succeed obviously increases because it is a standard being made by w3c now that's very interesting because it puts a lot of weightage that this technology will go a long way and the vision goes a long way instead of language Focus that you can see on the Java applets vbscript and Adobe Flash side so instead of language Focus the focus was on this new binary format and obviously the security sandboxing things that we'll come to later but that was the goal language agnostic platform from Gnostic rather than making it language specific stuff so that's what in a nutshell is web assembly very quickly like one sentence it's just a compilation Target a universal bite code that is platform agnostic so your code will be there and when you compile that to vasm which is a VM module or a VM component and you will be able to run it on any platform where you have the web assembly runtime so that's what web assembly is so let's try to understand even before web assembly and and Java first so when anyone writes the code the code that machine understands is the machine code so user will be writing the code it gets executed as machine code because the CPU understands only the machine code so the machine codes get executed by the CPU these are basically the binary numbers the format that is a CPU instru tions which comes as Ops Code which tell what does a CPU need to do now people obviously when things were getting started from machine code it went to the level where assembly came in so that assembly can make things easier for it to write so that you would have to write the machine code by hand and assembly made these instructions more readable now due to different set of architectures different set of CPU architectures it was becoming Again difficult to write the machine codes the assembly programs specific to each and every architecture it was a repetitive task for the Developers for uh the vendors so that's where came in the virtual machine code and that helped in reducing further like abstracting it further away from rewriting and developers only focusing on writing their code once virtual machine code virtual CPU code is actually the jvm bite code that came in so that is what jvm is very specific to Java languages and that is where when we compare web assembly or AKA VM uh I will be using those interchangeably so web assembly is language agnostic jvm was language specific because you need it was only focused around Java so next up is the strict sandboxing now before we actually move to this point we need to understand what sandboxing exactly means so sandbox in general as the name suggests is a controlled environment where your code executes without affecting rest of the system uh for example you have a house and you have a baby in one of the rooms she's playing and in the other room it is not affected where the meeting is going on so very small example because uh it happens to me when my my kid is playing in the other room and I am not affected in this particular room so her activities are sandbox to that particular room uh so that's why just gave this example now web assembly is obviously that I I said is a universal bite code format now when web assembly runtime is running the code so the runtime is making sure to make that web assembly code run in an isolated environment which is separate from the host runtime so it makes showes that your module execution and your host run time are uh separate next thing how exactly this happens is basically vasm provides a secure environment to run your code inside the browser because that is what it was originally built for for the browsers now wasm directly doesn't touch your systems it only use the specific web apis to do so like the run times only use the specific web apis and it has a separate memory buffer keeping it away from the other apps that's how it is like a kind of an isolated memory have its own isolated memory and there are specific checks that vum uh that the browser checks for the vam code it avoids the security pitfalls policies ensures that vam modules respect the website boundaries and modern browsers also have the builtin protections to further Shield against it the simple Point here to make is that this is a Sandbox you cannot access anything outside of the browser or even if when you are running web assembly or the server side you need specific philosophies like vasi web assembly system interfaced if you actually want to access any particular resource explicitly you have to mention that so there are very specific ways if you want to do stuff but all in all it is a complete sandbox also if you have a shared resource pool and you have multiple web assembly modules that are consuming it it is very hard to maintain that security level so wasm which is on the philosophical side and the runtime implementation that actually made makes everything possible whatever is written in the specification of web assembly so the run times makes it provably possible and makes the secure sandboxing as the strict sandboxing so that's where your code is actually running and that's where when we talk about running running the sensitive code or giving it on the browsers where people can put malicious code won't affect your overall systems because that runs in a specific sandbox doesn't have any resource request with respect to your host so it will be running isolated and securely so that's what strict sandboxing is and this is where web assembly has the strict sandboxing and jvm doesn't have that strict sandboxing w3c standard yes as explained in in one of my previous videos that vasm was accepted as a w3z standard which made it more adoptable solution for the long term for language agnostic a universal bite code coming to the timeline timelines are important because it's important to know some of the events with respect to the ears and that's where I want to share that it is not a very New Concept thought or philosophy people have been thinking to do it from a decade like over a decade uh but yes as things have matured uh the use cases have matured the adoption have matured the production implementations using web assembly has matured and with successful use cases successful company adoption things have accelerated a lot that is why we hear a lot about web assembly in 2023 era and that is why we are creating this course so that we understand exact L what web assembly is and how to use it effectively so in 2012 the ASM GS uh came into picture and then there were some of the enhancements going on in that specific field people coming in uh together brainstorming together how to form a universal bite code after that in 2015 you got the web assembly initial announcement and that's where things started to take uh a nice turn and in the history of web assembly ecosystem and in 2017 it made more and more progress for the web assembly on the browser side and 2018 was when the first public working draft was made and the threads support was introduced in 2019 now this is very critical year because now the browser adoption was getting a lot people were adopting use cases and many many applications uh online gaming all these things were happening on the browser side of things then things turned onto the server side and this is where the web standard and standardizing of the web assembly system interface happened in 2019 and that's where we'll talk about later as well when the first post for the vasi was introduced that actually created a lot of buzz in the cloud native ecosystem and what exactly triggered it we'll go through that moment as well moving forward to 2020 expansion obviously on the wasam ecosystem more tools more languages more Frameworks to ease out the tooling more language support meaning the language itself the compilers itself the generic tooling like cargo and all itself starting to provide the support natively for web assembly so that you can just easily compile and Target your compilation code to the web assembly format 2021 came in the first draft for the component model another very interesting thing that people are excited about a lot and we will dive into component model in upcoming sections 2022 web assembly course specification V2 because as the technology matures the number of like the demand becomes more like we want to do this we want to do that we want to do more and more and more and this is where the web assembly course specification version V2 uh has been going on 2023 has been interesting uh this year saw major conferences I would say one was the vasm io and one was the vasam con the first ever very big full-fledged vam conferences so that shows the education for web assembly and need for people to come and speak on different use cases patterns how to do how they are using and very interesting things on WebMD coming in all together and that is where the enhanced component model are on the final stages of being published another very interesting uh turn 2023 is uh seeing at the time of the recording is the vasm ml inferencing so machine learning inferencing as web assembly modules is becoming more and more trendy and popular and it solves some of the cool use cases when we talk about machine learning inferences so that's a just about timeline for web assembly starting from like the ideology and uh some of the thinking in the same lines that web assembly is today starting from 2022 to 2023 and I think the future definitely looks bright and we'll talk more as we progress in this course about the server side web assembly Cloud native web assembly web assembly talker web assembly and kubernetes coming on to the uh web assembly success in the browser so basically the all agenda was to run the code that they are having into the browser see the thing is in that era I everyone was thinking that because the browsers were becoming more and more popular of the consumption of the application so it was not only the desktop applications that the organizations wanted to give to the users now this is very important because this also kind of relates to why people started to think about web assembly in the first place you know why why they want to run their application their desktop applications which are running successfully onto the browsers this is because the the browser adoption was increasing rapidly uh and the organizations wanted more and more of their products to be consumed and the best way that people were consuming content at that particular point of time and it has grown exponentially since then are the web browsers and that's where company wanted to put their most used applications uh onto the browser and it was difficult because those were not JavaScript applications they were written in you know um traditional languages C C++ uh having the maximum performance level so Adobe and major companies have used uh M scripton which is a tool chain that converts the llvm ir2 web assembly and this is where inscript 10 has been instrumental in demonstrating the potential of web assembly and helping the transition of like full applications part of applications uh or the modules to run inside the web browsers so after that you have figma figma also started with as smjs and they ported to web assembly and figma is also widely used application so I think when I talk about success in the browsers these two comes to my mind instantly because of the level of usage that it gets because the figma templates that are being built the Adobe Photoshop editing that people do and the these are very heavy applications when you run on as desktop applications so you need that smoothness and that smoothness meaning when you are drawing something or when you are putting uh this thing or this thing so that smoothness means the near native speeds so that speed has to be there and that's what web assembly helps you give so it gives you the near native speed so we have talked about the strict sandboxing it gives you near native speeds and that's where I think the most powerful combinations comes in and obviously web assembly also helps you to run your code in the browsers run your other code which is not in JavaScript or these languages so you can use your cc++ or any other language that can compile to web assembly to be run into the browsers so you can write in your choice of language and you should be able to run that and you get that Performance Tuning set in your head and in your language and then you are able to run it these are such true Powers because you see the smoothness is pretty critical and you feel when you are on these websites doing it Google Earth also is uh uses web assembly Google Earth is basically a static you know kind of a 3D game because you can revolve around the globe you can see what is happening and it is so smooth and web assembly makes it so smooth because there are the web assembly functions modules that are running over there and there are a lot of other use cases like the online gaming the multiplayer online gaming which is there so you are doing that multiplayer online gaming and you are uh making sure that it is being so smooth like you are firing here and you are able to see that so I think that is the success that I call for the web assembly so that is the success in the browser so web assembly is right once run anywhere though in my opinion the true power because actually the the tools these days are very mature so even if you want to compile for different architectures it's not that difficult you can use the standard tooling to compile different architectures though it is one of the features of web assembly that is a universal bite code but the true powers that in my opinion are the secure sandboxing near native speed write in your own language and then compile to web assembly and run it and ship it and the smaller binary sizes because it's not like Docker where you are you know having your dependencies libraries everything packed up inside as a container image uh that's where like people compare it the web assembly and the docker ecosystem but yeah it's the code that you have to run uh think of it as a serverless model for a second and then smaller binaries that you can execute so the secure sandboxing near speeds polyglot and smaller binaries are the true benefits uh when it comes to the web assembly ecosystem now I have heard it before because you might have heard similar sort of things when jvm or Java came into the picture but the thing is again it is language specific now this is language agnostic and this is a w3c standards that again makes itself you know way ahead in the leap and that's where you can see the adoption and the success on the browser if you look closely you can see that there's a cc++ or rush or go code which you compile to the web assembly module and that runs with your stml CSS and JavaScript as part of your web application on a very high level it looks like this is how it is like you have web assembly module and it runs alongside of your HTML CSS and JavaScript code but wait a minute the isolation and security multiplatform smaller binary size instantaneous startup times doesn't that ring the bill do you only needed for the browsers and that's where the whole conversation was driving like these are the benefits that everyone needs it's not the benefits that only the browser needs so that is where web assembly was started for pting applications onto the web with the goal that I told you but soon people realize that this has a huge huge potential when it'll go to the server side and that's where things started to get interesting for having a new you can say concept within the web assembly ecosystem for running web assembly on the server side so those are the evolution waves Matt who is the founder of fermon he termed web assembly as the next in the evolution waves not only him but there are many but I I personally have heard from him so you had servers in the past and then more you abstracted those servers with the virtual machinein so you click a button you get an instance in the cloud and then you have the next Evolution wave which is container wow I can abstract even the virtual machines actually it's the abstraction of the operating system but still you have the abstraction level over there where you can run multiple containers and you can just package your application and run any container on the same virtual machine the next Evolution wave is even smaller which is web assembly so it is even smaller size and it's just the code that has to be executed which does not have any relation to the host operating system that is running on environment that it is running on and if you have to give any access it has to be given explicitly so it's basically deny by default and you have to give explicit access why the specific tool chain like vazi which we'll be talking about later on uh but yeah that's where on the evolution cycle web assembly sits and especially for the serverless application Edge use cases for the edge appliances where you have very less memory you can easily have web assembly runtime and run your web assembly modules on those devices and best as the startup times are instantaneous it Powers the Next Generation serverless that is why many of the startups in the web assembly ecosystem are providing the next 10 serverless space or the next gen serverless service based on web assembly because it actually makes sense because of the cold startup time there there's no concept it it just starts instantaneously so those are the evolution waves uh when we talk about the server virtual machines containers and web assembly coming next let's try to understand it from another angle so there is a user a user writes code so a user writes a code in Rust and that's a simple hello world program and a user is able to use same tool chain which is commonly used CaRu to build and just Target it as vasm 32 vasi to build a hello. vasm executable file so the hello. wasm is actually platform agnostic able to run on any architecture where you have the web assembly runtime this is how the instruction set looks like and this is the vat for the so you have the web assembly VA format like this and this is the JavaScript code to execute that web assembly module so that's a pretty simple stuff that's how it looks like so you have a what you have uh JavaScript equivalent code and then this is how the instruction set looks like and when you compile it using the same tooling you should be able to run that on any architecture using the web assembly run so we just talked about web assembly on the server side that due to the benefits of web assembly which is the faster startup times secur and boxing instantaneous startup times uh smaller binary size so these set of features are pretty important when we talk about servers as well but things are not as simple as it sound when we talk about server side web assembly um let's try to understand some of the use cases like why actually we would be needing server side web assembly so web assembly on the server site has been ever growing area of Interest since the start of the success of web assembly in the browsers and it is mainly targeting you know the high performance computations like wherever the high performance Computing is required more and more machine learning inferencing use cases we can see image processing video processing use cases for simulations for running untrusted code so for running the secure sandboxing so wherever you want to run the secure code the sandboxing part of web sbly can help that's where on the server side it's great to have that game servers where you can have multiplayer type of games that's one of the big use cases on the edge on the iot devices there it becomes really uh interesting web assembly enables the code to run with near native speeds taking the advantage of common Hardware capabilities and again it's platform agnostic portable that's where the power lies some of the interesting uh use cases which are already there widely used you can see in on the server side as well you have Cloud flare workers allows running the web assembly at Edge bringing the comp ition closer to the user then you have fastly fastly compute at Edge utilizes the E assembly for the serverless functions uh then you have firon they use web assembly to power the serverless so actually web assembly is powering the next gen serverless uh Shopify to front backend dashboard Shopify also leverages a web assembly for image manipulation data processing uh for enhancing their efficiencies so I think these are some of the actual use cases used in production used by many folks uh but others as explained like for high performance uh Computing machine learning distributed computing like all the multiplayer games Unity there also a lot of web assembly Mak sense so those were some of the use cases uh but again as mentioned when we talk about web assembly on the server site it's not as straightforward you need something uh to be done and that's what was being developed so if you see when we talk about vasm of the server site or web assembly of the server site the most important stuff that you need is you need to do some interactions with the host you need to maybe interact with the files read a file write to a file directories environment variables I mean those are some of the basic stuff that you would need for any application to make sense when you want to run on the server site but web assembly being web assembly it does not know about the host so how can we do it keeping the secure sandboxing in place so that's where vasi proposal came in and in 2019 web assembly system interface proposal was there its implementations are are done by the web assembly runtime so when you install web assembly runtime you can use a web assembly system interface for your applications to interact with the host operating systems to do some of the tasks which are required like accessing the environment variables files and directories keeping the sandboxing in place because you only give very specific access via the vasi to access in a secure way so that's what this is all about so looking from another angle again web assembly system interface to major things that were always in mind even when the whole people behind the web assembly talk about uh the web assembly on the server side where security and portability basically for making web assembly usable outside of the browser so any application call that you see when you do with the application it actually goes via the kernel via the CIS calls so those are called the CIS calls it goes via the kernel and then it accesses the file system and stuff like that this in web assembly if it has to be done it is being that using Vasa and Vasa module does not compile to a specific OS so it needs something and that's what uh vasi is so I hope you got a gist of wasi there will be another section where we Deep dive into wasi how it actually works behind the scenes and some of the more Deep dive concepts of wasi but on a high level for making web assembly to run on the servers this thing made it possible and this opened up the N number of use cases another very interesting thing that I'm very excited about and most of the web assembly commun as well is the component model so I'll give you just a brief over here and then we have a separate section where we Deep dive into the component model including the demo so think of a code web assembly lets you write code in any language so think of like you are writing a code in rust or in Python and you have written something that can benefit a lot of other users as well so you package that and the other person is able to just import what you have written and and use it in their program so that removes the duplicacy that you might have to write it improves the reusability so you will be able to use anybody else's component that does a specific functionality in your code so you will be able to import the code written in any other language which is web assembly module basically so you will be importing that web assembly component that has a specific set of functionality use that in your code in your application in your business logic and then create your application so it improves reusability language neutral plugins and it is being driven by the same under w3c with specific Standard Security and portability and all those security features so I think component model is what people are really excited about it's on the verge of getting published and we'll dive more into component model in the future section where we'll be going through a complete end to end temo as well to see this in action so now we know that there is a lot of Buzz excitement and actual practical use cases when we talk about web assembly whether it's on the browser side or it's on the server side now things are evolving rapidly and really really fast there are a lot of adopters like very big companies BBC Adobe and all these companies which are there that uses web assembly and then there are a lot of fancy startups very good like vmer DPO cosonic ferion second state and and many others that are doing very great research work and taking web assembly to the newer newer Heights and also participating in the standardization of the different projects within the web assembly ecosystem so I think the companies are evolving continuously uh the interest from the established organizations are evolving continuously and there will be more and more and more of these things now now as the cncf landscape has evolved over the years like I have been the Ambassador for like so many years now I have seen the landscape evolved I have seen the cuberes whole ecosystem around cuberes evolved we are seeing kind of the similar things with webm where people are kind of you know using it at the early stages thinking of it like the early versions when we had Docker in place and some people were experimenting some people were doing R&D research and some early adopter of kubernetes and then slowly slowly it becomes the defacto stard so it's in those kind of stages and there is lot of innovation lot of work a lot of research a lot of great startups coming into this area but since all these things are a lot a lot a lot they needed to be a certain place for this and what better than a cncf landscape uh so we already know that cncf landscape is massive and uh we enjoy navigating through the cncf landscape I have given a couple of talks on how to navigate a cncf landscape a proper way but now if you go to landscape. cncf doio basm you will be able to see everything with respect to web assembly uh so you can see different set of so you can see a lot of things like different set of languages uh you have vasm specific one grain um and all the other languages which are there and then you have the run times which are the Core Essence part of the web assembly ecosystem you have vazo uh you have wasum Edge you have wasm Cloud you have wasmer and so on and so forth then you have the application Frameworks Frameworks for building and making easier to build the web assembly ecosystem uh like exsm spin are the very popular ones and then you have the edge and the bare metal Ai and machine learning section observability options like mod server observe SDK we have decentralized platforms and hosted platforms that provides web assembly Services the serverless offer Rings fir on flows Network fastly uh the cloud flare workers you have the orchestration and management and you can see the Kwa which is K aam that we just discussed razi that we just discussed Yoli which is also there now in the Sham again just like the cncf landscape it gives you a great way to track what is happening within the web assembly ecosystem so I think that's a great way so that you can get your heads right okay this is the stop happening in the web assembly ecosystem and you are able to think and analyze some of the projects what are open source projects in this area what are some of the organizations providing the hosted Platforms in this area so that you know what people are using in different ways for web assembly on the support site and with respect to Cloud native uh I think there's a lot of integration there have been a lot of cool projects when we talk in the cncf ecosystem as well that uses web assembly a lot of organizations who are cncf members that uses web assembly and when it come to kubernetes stock or ecosystem it definitely benefits into the cncf ecosystem so yeah wanted to give you a gist about the cloud native interactive landscape for web assembly let's talk a bit about bite code Alliance so bite code Alliance is a nonprofit organization dedicated to creating secure New Foundations building on standards such as web assembly and web assembly system interface B code Alliance is committing establishing a capable secure platform that allows developers service provided to confidently run untrusted code on infrastructure for operating system devices and stuff so basically it's the foundation for web assembly ecosystem you can see the great members in this particular ecosystem who are working towards the standardizations of the web assembly projects so you can see some of the projects that are there in the bite code Alliance like the vasm time crane lift uh warmer jvy it basically maintains the security and the sandboxing for the web assembly projects have the standardization is going in the right place right direction the effort of web assembly is solving the crossplatform stuff so there is cross company collaborations that have to take place and there has to be a foundation there needs to be a foundation that takes care of all the meetings or the working groups and all those things uh I think bite code Alliance has now have a Toc there are different members on the to from different organizations who are working in the web assembly ecosystem on different run times and they are collaborating on all the w3c standards with respect to web assembly on the component model on the vasi ecosystem on the AI inferencing standardizations and they are trying it under the same foundation so that everyone agrees and we are uh following the right approach for doing this following the basic principle of security and portability when it comes to web assembly so that's what by bite code Alliance is in my opinion like bite code Alliance is for web assembly what cncf is kind of for kubernetes I kind of see it in in this way so you can check out out all the news about and home and membership and all that stuff around GitHub how it is happening in some of the meetings of the white code Alliance as well so let's talk a bit about was in sandbox now and wasm sandbox is one of the important parts of keeping the web assembly promise of secure run times taking from the web assembly design the security model ofly has two important codes protect users somei or malicious code and provide developers with useful Primitives and mitigations for developing safe applications and this is particularly useful because web assembly was originally designed and most of how it is used right now is running web assembly functions and what this means is you have some function or some part of your code written in some language you compile it as a web assembly module and use it in some other languages and this particularly requires you to run untrusted code so this particularly makes sense uh considering how web SM SMB is mainly used one popular approach that might come to one's mind is SFI or software fault isolation techniques but before talking about SFI let's talk a bit about sandboxing so what we want with sandboxing is just have some security mechanism that isolates a programmer process from rest of the system and allows it to run without compromising the security of other parts of the system so let's say if you want to incorporate third party libraries into your code or just some VM modules in some other program we may need to run untrusted code which poses a big risk to security of the host environment since malicious code could potentially compromise it so this is why you need sandboxing in the first place and for a lot of these applications having the full-fledged VM becomes really heavy and you more certainly have other benefits of web assembly but in terms of sandboxing having a full threed BM is really heavy to do this and one of the first things that comes to one's mind when trying to do this sandboxing or how this very thin sandboxing layer is SFI or software fault isolation so if you didn't know about SFI this is mainly based on the key Insight that you could encapsulate potentially faulty code in isolated compartments and it comes with the key Insight that it is possible to limit the impact of any errors or bugs within Those comp compartments and you can protect rest of the system from home now you can also formally verify that these isolation mechanisms themselves are correct and functioning as intended the way you would do this is you want to verify the compartment boundaries are properly enforced and that data passing between compartments is correctly validated and that any errors or exceptions raised within a compartment are properly handled and do not escape to other parts of the system so despite the promise of SFI and formal verification the adoption has been very limited due to multiple deployment challenges with SFI so let's take a look at how wasm or more accurately wasm run times do this so first what we need to understand is that this needs to be implemented by the runtime itself and this does mean that we could create a wasm runtime that runs this non-native instruction set web assembly very differently or gives it complete access to the host or you could also have a wasm runtime there are actually quite a few wasm run times that use SFI techniques to do this sandboxing so you could also do that so it all depends on a wasm runtime but usually how a wasum runtime does is you separate the core wasum language from the specific API provided to each wasm module by the runtime or other modules th wasum enables the creation of like these divers and times that cater to various needs the way you would need to implement the sand boxing for what was modules would also be in the run time itself so this also means that any external third party libraries you need would need to be linked with this wasm code earlier we us have a tool called wasm Linker which is now a part of some other popular tools you take a look at later in the course that is the way you would often want to use any third party libraries and separate the core verm language from these specific apis this is exactly why a lot of things become challenging as well this is exactly why there's a need for something called Web assembly system interface which we'll talk about later in the course but doing the sandboxing this way does cause a lot of challenges so we'll also talk about how to get around the challenges and what those challenges are later in a big part of this is also due to how memory is represented in web assembly memory in web assembly is represented as contigous mutable array of uninterpreted bites which dynamically grows in size usually wasam run times have 64 kilobytes of pit size and the bytes can be mutated by the web module to memory instructions and there's particularly also parts of the web assembly memory or the parts of web assmbly seror memory that can be exported so when the web assembly module sees that you want to export particular parts of the memory you can also have the host machine access art memory and modified art memory as well originally webm linear memory in early days of web assembly when web assembly was only supposed to be run on the browser and there was only tool Ling to do that kind of stuff run web assembly on the browser you would have a your web assembly linear memory as a JavaScript object you think of it as all of the linear memory that you need for a particular module would be a simple JavaScript object now most certainly needs you don't need it to be a JavaScript object because there is enough tooling around web asmbly on divers context and another browser another thing to note with this linear memory which particularly ties in well to the security aspects is that the indexes of the linear memory can be considered as memory addresses and the instructions that you need to access a memory location are given an offset relative to the start of the memory so there's no direct addressing possible you can only have an offset that is relative to the start of the memory that you can access if we can also take a look at a code example to do this what what this allows you to do is you can have modules with potentially harmful code and it is very easy for the runtime to understand if they are trying to assign linear memory outside of their memory space even if one web simply module is trying to access the linear memory of another web mod units really easy for the run times to identify this and the run times also know exactly how which memory it is being used and th it is also easier to identify from what mod in M assembly is trying to intrude into memory spaces of other modules so let's take a look at this very simple example with wasm B we not try this example out for ourselves but we can very easily try it first what we do is declare that we want a web assembly senior memory of size two so that's what we defined first and then we have multiple functions that set some value in the web assembly linear memory and also read some value from the web assembly linear memory and you can also do this lowle Tas very easily with bom so you can very easily do this with the linear memory although you most likely for a lot of your applications why not need to do these particular things with B and B so linean memory solves a lot of problems particularly the problems are this kind of linear memory sols is the reference in pointers to unallocated memory which if you remember is a big problem with see uh you had tools like while grind to identify M leaks and uh if you had Malik some object and you the reference that allocated it used to be a big problem and linear memory solves all of these problems it also solves free memory allocations so L memory does solve all of these problems but in web assembly the semantics for a pointer are also a bit different especially with web assembly you don't have a semantics for a pointer but you have function calls and variables in fix static scope so any references to invalid indexes in the index space trigger a validation error at the loot time itself even though msmb solves all of these problems with the linear memory there are a few kind of attacks that the web assembly linear memory doesn't solve for this we especially take a look at how bom gets around control FL Integrity issues and uh we'll take a look at how web assmbly sandbox helps you to solve things so especially with control flow Integrity what you want to do is Safeguard against multiple types of calls to different part of the code so there are some languages which might have four different kinds of calls and multiple different kinds of calls at least web assembly you have direct function calls indirect function calls and returns and you want to safeguard the sandbox against all of these kind of control flow Integrity issues so wasin particularly implements function pointers through indirect calls to where the target function of the call is contained in a statically defined table so if you remember earlier we had also talked about tables at this 3ia series this is where you have Target functions of the call store and typically this safeguarding process is implemented through runtime instrumentation so what this involves is you have your compiler generate an anticipated flowchart of program execution and what the compiler thinks the program execution would go like so you generate a flowchart of that and then you insert checks at each call site to ensure the transition is secure so you have sets of anticipated call targets created and assigned unic identifiers and the runtime instrumentation verifies if the call Target belongs to the expected set of call Target so if this check passes the origal call proceeds otherwise you have some failure protocol which with web and R time usually involves in terminating the program there are all of these safety measures implicitly bigged into the execution process with the web assembly run times and the use of explicit function section indexes we were talking about briefly under guarded call start inherently secure direct function calls and returns as well so you also have the type signature of these indirect function calls checked at the run time and establish some sort of basic and inherent control your integrity within your WebMD runtime and all of this is established without the need for any explicit runtime instrumentation within the web assembly module itself so there's no need to change stuff within the web assembly module but we only talked about run times around this to talk about how we establish the sandbox which is particularly interesting as well so that's how webs smv sandbox and webs smv memory together handle all of these issues and at this moment it might seem like a free lunch but no it's not a free lunch the architecture effectively prevents direct code injection attacks but it also introduces an inherent trade off so you also inadvertedly complicate the task of the operating system in preventing undesirable actions within the sandbox itself so let's take a look at a few intuitive examples where this might fail and why this is not a free launch there are most certainly a lot of different examples and kinds of exploits that people have found that web simply doesn't card against but we'll take a look at a few very intuitive examples popular problem with Software System is buffer overflow attacks and usually what you do to get around these kind of attacks have something called a stack Canary what a stack Canary does is it inserts a random value on the stack that is s later to ensure that it hasn't been tampered with if the value has been modified which is randomly set on the St the program indicates that it was an attempt to exploit buffer overflow so first notice that these kind of Stack Canary systems which have always existed in traditional systems these traditional memory monitoring systems are practically ineffective within the web assembly land box and uh these mechanisms which detect attempts to tamper with unauthorized memory regions are unusable within the webm sandbox itself due to the strict containment of modules memory space so this is most certainly something you have a tradeoff with in terms of web assembly sandbox another thing is web assembly provides a level of implicit control GE Integrity through explicit function section indexes and protected call stocks as we just talked about but it is important to recognize that the production is not all incom passing in the sense that there have been code use attacks which Target indirect calls with function level ularity and these still remain a potential thre even though we did talk about how web assmbly run times Safeguard indirect calls so there's also unmap pages so this is also one of the fundamental protection mechanisms in N programs and what this involves is you utilize virtual memory with unma pieces and when an attempt is made to read or write to an unmapped page it triggers something called a page fault and leads a termination of a program however if you think of trying to build this kind of system within webm linear memory well the linear memory operates very differently it provides you this single uninterrupted memory space without any gaps or without any UNM areas at all but how du to the options of guard pages that can be installed between starting data and the unmanaged St and the heat overflows in one section can just cupt data in any adjacent sections and this can go quite unnoticed because you cannot have these card pieces at all if you see linear memory as it is designed is inherently non-executable to prevent jumps to any part of the linear memory and furthermore web smv also does not support marking any part of the memory as read only hence all of the memor is pretty much writeable and uh there is no idea of a r new piece of memory and you cannot have these C pages that we talked about they enrolled in Native programs so there are quite a few problems still with the web assembly sandbox but it provides this very thin virtualization near and this is also how webly is being used in most cases today it's been used in embedded environments quite a lot so even though there are quite a few techniques that you cannot run with web assembly memory and the web assembly sandbox like stock can and having guard Pages we talked a bit about the kind of problems that webg does solve now in order to understand about web assembly and we have talked about vasm module like we have been saying vasm module but it's kind of important to understand what is inside the vasm module so we'll try to understand it not very deeply but at least to a level where we are comfortable and we know what goes inside the basm model so there are two types of representation one is text format uh which is the B implementation another one is the binary format but in order to understand this particular section of vum module we will try to see it from text format and then we'll do a walk uh to Binary to compare it how it looks like in binary and how it looks like in the text format so when we talk about a vasm modules there are basically two sections one is the known section one is the custom section so known sections are the ones that are checked at instantiation for validation and the custom sections are the ones which are not checked at the instantiation of the module for validation in the known section there are different sections so we have the first one even if we Define no module like we say nothing is there and it's empty mod modle then also there is something which every web assembly binary will have which is called the Preble so Preamble is something which is a bite aligned memory so you can see here we are starting at zero address and then we are starting at 4 so we have the VM binary magic and VM binary version for every web assembly module which is there this is the hexadecimal representation and we started this memory address so this particular thing is a white aligned memory coming to different sections the first one is the type section in type section we Define list of all the function signatures so all the function signatures and this is the B for that you can see all the function signatures different type of function signatures over here import means all the module import so for example we are importing particular CIS call from wasi snapshot preview one so any CIS call that you are importing or anything that you're are importing would be coming in the import section third one is the function so list of all the functions so you can see function andore start and you can see the function details over here so list of all the functions come under the function section a table which is used rarely it's a typed array of reference that can't be stored in the linear memory and memory is the linear memory of the module so if you define you can Define the linear memory of the module what goes into the memory and then you do the memory do fill so that's the water representation of uh memory some of the other ones are start function called when you run the module export meaning list of all the objects that will get returned to the host and then you have Global which is the definition of the global variables code which is a body of each function element that declares the data that gets loaded into the modules table and data uh is the data that gets loaded into the modules linear memory so in theory this is what goes inside the module let's try to see from an example prospective and see all these functions so this is the theoretical aspects and you have to open your mind to understand it like what goes inside the module there is known section and then there is custom so after known section there is custom sections like name Etc so that that can become but in the known section we have type import function table memory start export Global code element data which are there so this is the format so you can see this particular website is called VA to wasum and here on the left hand side you have a VA represent resentation on the right hand side you have the binary representation and you can see over here as well it is a web assembly has text and B format this formats converts text format to Binary format so that's what it is there and you can see the code format and the log for this like how it works so we have studied so let's start from an empty one so I told you even if the module is empty we have seen that in the slides before like even if the module is empty you will still have the Preble and you'll they have the basic basm binary magic basm binary version and some of the other things for each web assembly module and let's try to do it with a simple so this is a simple program and you can see it exports add two and the parameter the function so you can see section type so type is having the type of the function and then you have the function you'll be having a section called function because we are doing a section function and then there is a export for this export code and body because you have function code we have function body everything is over there and then you have a section name and this is how it is represented in binary and you can see the hexadecimal representation of it and you can see all the memory addresses and stuff where everything is properly getting stored and this would be the JS representation JS equivalent code for this instantiation of the module and uh you call the exports and then you can see the JS logs let's see bit more enhanced example of factorial so again we start from a module we have function we have if else and then we have end and if we see some of the sections from here you can see first you have the Preamble then you have the type section in that also you have fun type and then you have section function you have an export you have code you have body and you have the name so these are the same coming to the bulk memory so we can see the memory model we'll be able to see the memory section over there so you have type function and you can see here we have a memory section as this goes into the module this is what a web assembly module is so you can actually see like you won't obviously you won't be writing this or you won't be writing the binary directory you won't be writing anything of that you'll be writing the code you'll be compiling it but you should know what actually goes inside the module and how it is represented with the binary exard decimal codes uh in the binary and how it is being processed so that's what goes inside a web assembly model now let's talk about VM networking so for most apps you would require networking and when we talk about vaza which is web assembly web assembly modules cannot support networking on its own due to all the security sandboxing and isolation this is why you need to bring wasi we already have learned about vasi vasi is web assembly system interface that acts as the API between your web assembly module in the user space and the native kernel code which is the native code so it acts as a bridge between them and vasi provides you uh with a set of apis now what do I mean by that is there are a lot of proposals from different scenarios for example like garbage collection and there is one proposal for networking as well so there is a vasi networking proposal which is already there and has set of API definitions now what happens is vazi has these proposals and set of abis how to fulfill certain specific task in a standardized way so that it is same across all the platforms uh now it's the runtime so there are vum run times for example vum time vum Edge vzo all these are the web assembly run times now these run times Implement these set of apis so for example since we are talking about networking over here so run times are implementing the apis in the specification or in the vasi networking Proposal with their own Logic for example this is how vam time which is one of the oldest web assembly run times have implemented the sock except and the basic networking so this is uh the pr is from February 2022 and you can see it implements sock accept and basic networking and there are 18 file changes in this particular P request so you can go through all the changes so together this enables the basic networking rust so it has like sock accept uh all the basic networking pre-opened socket so whatever is required for a socket connection to be built it has implemented that and even if we see the file changes you will be able to see in the source file that there are different like sock except this is how the sock accept is there and different set of implementation for the API specified in the vasi networking proposal so you can go through this particular PR and have a look how the pr was done in vasam type so how the implementation of those API specified in the vasi networking proposal was done within vam time so this is the proposal and this is in phase three and you can see it has the introduction and introduction means just adding the TCP UDP uh sockets and the domain name look up to Basi it extend the bstd socket surface with the intent to enable the server and client networking running on web assembly so The Proposal includes uh four new vazi modules and you can see that over there and you can see the goals to enable the basic functionality of tcpb application and some of the non goals over here and then you have the API walk through and some of the things that you need to implement and also the pox compatibility over here so you can go to the pox compatibility at application Level so if we talk about like basic applications you know you might want to invoke TCP IP connection you might want to invoke a web server you might pH to connect to a database uh so all these are the applications where you would actually need networking enabled another runtime which we will see a lot of demos is spin so spin is an application framework for web assembly spin also implements socket connection like connecting to the K store which we'll demo later in the course as well on the bare minimum so on the bare minimum when vasi runtime wants to implement wasi API for networking the most basic thing is to open a socket connection for example if you have guest module so by socket connection you can enable the connection to the web server or database or whatever and vasm runtime starts that connection based on its own implementation in instantiated by the guest module and specifically there are certain things like sock bind sock listen as you can see on the screen so it's socket so you create that and then you have bind and then you have listen listening for it and you accept uh and on the client side also you connect to it and then there is once the connection is established it blocks it and then then you have the read write and then you close it so this is how it actually happens and what I'm going to show is whatever you're seeing on the screen right now all these how they are done so we we'll use a simple C program and see some of the CIS calls over there but we have a file over here let me open that so in this example uh it's a d player example and uh you can see at first it's creation of the socket so you can see socket opens the file descriptor and the Stream uh so that's what uh afin and sock stream would do uh listening to the stream of arrays or stream of bytes over there and then once this is done initializing the server address and you can see after this we have the Second Step that we saw in the diagram was of the bind so you bind that to the socket address and after that you listen so you can see setting up the queue in the cural to hold the pending connection and then we create the accept we have two players so we have created two accept so that is the accept for the socket and then there is a read write when the play is going on now here what we are using is we are using the S socket so we are using the system calls for that so GCC and we give Lego it generates a do out so we'll just do run a do out and it's listening on 45 3 2 1 so we will net cat so you can see you are player one waiting for player two and if we go to another terminal and we netkit you will be able to see you are player to so now the connection has been established and welcome to the chocolate Lego uh Blog game and there are 10 Lego PC whatever that is so you can see connection has been established and that's why it is I think with this it shows the entire process that I wanted to show um for this particular was the networking how it is you know being done of creating a socket and that's what is defined in the vazi apis and that is is what is being implemented in kind of a similar manner just like we have done here it's a very simplified version but the run times uh they are done according to vasi and specific more set of features which are provided one more thing which I wanted to show is wasi X there is networking and it is there but when you talk about multicast when you talk about IPv6 when you talk about more complex networking which is required so v x is something which has full support of sockets now what is v x so wasi X is a long-term stabilization and support for existing wasi ABI plus additional noninvasive C called extensions that completes the missing gaps enough for the real world applications so it's basically termed as a super set of fi it might not be as per the vasi specifications though it has like it has already implemented the vasi specification plus it has its own set of features to provide all these things like multi-threading asynchronous support file system support subprocesses browser support Dy run type support all these things and for now it is only being supported as vmer run types v x supports the vmer Run type that's how it is being done it is actually built by the folks who have built vmer and you can see there is like the documentation over here and you can see developed by the VMA team and one of the most interesting thing over here is to have a look at this statement VX is a transformative designed to make more compatible with poix program for the seamle execution of more complex application browsers and serverless environment so all the critical missing Pro features in vasi v x allows the developers to use web assembly so it's basically they did this to make sure more and more people can adopt web assembly although most or the extensions or whatever they call it they are not in the web assembly like the bite code line standards the vasi proposals so wasi proposals is there and they have termed it at as vasi X making it like vasi is there and it is compatible to that but they have enabled more set of features on it so you can see vasi preview one and then it's a super set of vasi which is having more number of features and they call it as a extension of wasi you can also check out this project if you are looking for advanced networking or some of the features which are not there in some of the specific run times with respect to the wasi specification for networking which is already out there and this is the core wasi API proposal for managing sockets so that's pretty much it for the vasi networking so now let's talk a bit about the tool chains around web assembly and the kind of tooling we have around web assembly to build web assembly modules compile it down to webs SMP and run that in other kinds of languages this tooling should particularly be very strong because we are trying to run arbitrary code and arbitrary languages so we would essentially want a very strong web assembly to make all of this run seamlessly so let's start by talking about web assembly run times and all of your web assembly code is being run by a web assembly runtime under the heart and all of their wasum features also depend on runtime implementations so for example let's take a look at the wasi spec and you might find this very familiar if you V have your see or posx and wasi has very similar names for system calls so was he defines this spe and was he tell you that what kind of inputs is XX what kind of functions does this do and then our we simply modules can use this we haven't talked a lot about wasi yet so right now you can just understand it as a way to be able to run web assembly modules on all kinds of platforms so you probably have different system calls on each platforms and was each just allows you to do so we'll talk a lot more about wasi in upcoming sections but this is just a brief review of it just to set some context sure what we seeing over here so wasi shows me the spec and tells me what to do but it is up to the runtime to implement this and to this extent you could also have run times that for example implement the sandbox in a very different way you could have a run time that takes a wasm module and runs the wasm module but gives it full access to the system software and you might think isn't this violate like all that we have been talking about sandbox or does it very different and well it does and all of this is up to the runtime so run times are responsible for this implementation and making sure all of the wasm features are properly implemented let's talk about b lipy as an example so we already talked about quite a few of the compilation steps and uh how any code is compiled down to webm what was lipy does is it just gives you an interface for all the fpy functions so you can use them while making your web assembly modu and you can compile C code directly to web so was lipy is usually distributed with the was SD K so you have Clan with was SDK that compiles a c code into lvm ir and lvm applies optimizations to the IR which is then converted to web SMP and then you load the LMI or to BM instructions and then you can also have any object files that are generated and those will be link together using the lldd Linker so we'll talk a lot more about this in upcoming sections but this is an overview of how bipy does this and then you have a Linker there used to be multiple projects like a Linker to do this kind of stuff and now they have been distributed out of the box but you essentially also have a Linker that links the program with was lipy ensuring that the standard liity functions you use in your C code any system calls you use in your C code are properly implemented according to the wasi spec so we saw an example of the spec and if you had that kind of call in your C code and you wanted to lower it down to web SMD you need to do a few things to make sure that function is properly implemented according to the POS what bzy Lipsy usually does is it has these two parts we'll talk about this in a lot more detail but over here we are particularly talking about this in the context ofm brand times I'm giving you an example of how different things in Wasa brand times usually work so that's why we take one of the most popular examples V lipy and talk a bit about it we don't talk about the wasi parts or very specifically just because we are here to talk far about wasi you can roughly divide was lipy into two things so you have like the was lipy bottom half and what the was lipy bottom half does is it's just the lower half of a traditional lipy implementation so that consists of C interfaces to the low level VY system calls so this implementation also includes something called the pre-open fun functionality and what this does is this just emulates the posic cpis accepting absolute Parts by translating them into pre-open directory handles and relative parts so if you recall this kind of stuff can be done with open ET so was lipy particularly takes inspiration from lip ROP to do this kind of stuff and what the top half of the B lipy does is the upper half of a traditional Lipsy implementation that consists of C standard Library another high level functionality so that's how was ellips structured and that's how different cent times can use this kind of functionality this would particularly make a lot of sense if you have written code in C earlier even if you have not written code in C earlier you might have gotten a bit of an idea of how the linking process happens and how web assembly run times use this but if you have not coded in C or have not used posic cpis earlier it's completely okay if you don't know all these specific system calls that are stop okay let's come back to web assembly run times so when a web assembly module is loaded the runtime first passes the binary format of the module and let's take a overall look at what the Rand does to run this web assmbly module so you of course first pause the binary format of the module and what you also do while doing this is break down the binary code or the binary format in which a web SNB modu is into a structure that the runtime can understand the runtime also performs validation to ensure that the code ades to WebMD specifications so things like type safety unmap memory addresses you can already consum at the load time we already talked about how webm mod is structured and what parts of web assembly module can respond to what parts so this particular makes a lot of sense if you remember about that so web assembly module can usually be executed in two ways you have something called ahead of time compilation and that's pretty pretty common so what you can do is use the web assembly pite code compile it into some data machine code before it is executed and this is very similar to how a traditional compiler works right you translate the web assembly instructions into instructions that the processor can execute directly and you do this with different kinds of languages already so you can also do ahead of time compilation if you want and this of course also requires you to let go of the universal comp ability that you can run a webm module anywhere you want to because once you generate an EOD it becomes specific with the architecture specific to the system the other thing which we do a lot of times is jit compilation so the r time can use a jit compiler that converts a webs code to native code on the fly as it is being executed and this approach allows for optimizations that would be based on the runtime behavior of the code so there are quite a few optimizations you can also make also this does depend entirely on the runtime so you could have a runtime that that let's say interets your web assembly code directly and executes all the instructions are step by step without compiling them into machine code so you could do this at the r time and there are a few web assembly run times that also do interpretation so this all depends on how a web assembly runtime is structured so once you have the web code is compiled it is then executed and the run time manages the execution it ensures that the Codey can switch of the web assembly sandbox model that we were talking about and it also manages the memory access handling calls to and from the host environment and enforcing the security baries that we were talking about so usually what happens is webm modules can only interact with us environment through a well defined interface and this interface includes functions that the web assembly code can call to perform tasks so we particularly sign an interface in the site of the web assembly system call spec that I showed you so the web assembly runtime most certainly does this when you run our web assembly module and the web assembly also has a linear memory model at the runtime is responsible for managing this memory which includes allocating and freeing memory as required making sure that it can only Access Memory within its range and finding out if it's trying to access memory which is not in the range so all of this is also handled so now let's take a look at some of the tooling around web assim in action so we'll take a look at all that we talked about in the video we'll take a look at compiling web assembly modules and then running web assembly modules in some run time and also running them in embedded run types so we'll take a look at all of that we'll take a few examples so let's first start out with using wzy lipy and wasi so I have some C code over here and all of this is pretty standard C code if you look at it I use system calls like open GRE right so all of these are pretty standard C system calls or posic system calls and I can use them just as I would write any c code this particularly is some simple C code to copy a file from one place to another so I have a front PA and then a two PA and this copies a file from one place to another so this is just some secod to do that and there's nothing specifically in this C code that's our web assembly all that we want to do is when we compile this C code we want to compare it down to web assembly insert so let's take a look at how one can do that so first what we'll do is we'll use wasy Lipsy from the wasi SDK I have wasi SDK installed so first set up the part to wasi SDK in my case it's this part so wasy SDK and wasi lipy also will give me a modified Clan so I can give a PA for that Clan just so I could use it on I have this which is a modified version of Clan that supports lately compiling it down to web assembly and I also need to pass the sis root so let's just that and now just as I would for any Clan compilation just compile the C code we have but I compile it down to wasm so I have a copy files wasm that is what I compile and there we have it so let's just take a look at copy files at wasum and this is indeed a web assembly binary module so we were able to compile some C code to web assembly and what we can now do is also run this with the wasm run time so under the hood when we are compiling the C code to web assembly We are following all the steps that we talked about earlier and now let's try to run it with a web assembly run time so we also talked about this and that is what we'll try to do I have something called minus minus map door and what the minus minus map door does is it tells the webm module what directory it has access to so here I give it access to our current directory and please the webm module's current directory for this example I use wasm time which is one of the most popular wasm Rand times out there but you can use your favorite wasm Rand time I have this file called random. txe and I'll just copy it to random 2.txt let's try doing that we can dite M and Inter so now we can see that random to.tx Asing exists so now we just saw how we can compile code to web assembly and then run web assembly code with runtime and all of the tooling around it makes it really simple to do it we obstruct all the SS that we talked about earlier in the video and now let's take a look at a rust example rust has a lot of tooling around where we simply pre-built in it so we can very easily start working with r and web assembly as well so let's take a look look at some Rust code that we have so this is a rust code to the same end it uses stdio in Rust so there's nothing specific in this SCE code as well for web assembly and uh this just copies a file from one place to another so let's TR this out ourself and right now I already have a random d. dxt so let's just this so first what I can do is use the sub Target art and what this does is installs support for the wasm 30 to minus was Z Target because this is what we be compiling it down to now what I can do is simply do a Caro build and because we want to compile it down to webs SMB we can also was in the Target to wasm 32 minus was and this will build it for us this is readyy quick let's take a look at what it has produced for us so Target for 32 minus release and our file was called copy vurus was so this indeed produces a web assmbly binary mod module as well so we can run this web assembly binary module as well and it will pruce the same output as we saw earlier but the tooling around rust is also very simple for anyone to start using right out of the box a very common use case of web assembly is running it an embeded environments for example writing a web assembly module in C like we did and running it in for example python or any other language so this is one of the most common use cases for web assembly so let's take a look at that I have some python code here where I use another wasm runtime called wasmer wasmer is also a very popular wasm runtime and it has a lot of Rich SDK support so you have sdks for wasar in almost every language so I particularly use was to run the wasm module that I had I start by opening the wasm module and creating a store for the wasm module so right now you might have some idea of what a store for a wasm module is but we'll talk a lot more about this later in the video we'll then as we talked about what we need to do when running a web assembly module within a hard time we'll then compile the web assembly module and we'll also say that we want to use wasi while running the web assembly module so I also say that I want to use wasi and I give it some arguments which are the arguments I give to my code and I also have this SP which says map directory this is same as what we are seeing in wasm time we give it access to the current directory and then webs SMD modules as you might recall from earlier have things that they import or export functions that are exported or interfaces that are exported through the web assembly module are the ones that the host can call we particularly want to call some function with a web assembly module exports by default a web assmbly module with the was SDK or even with the rust compilation creates a function for us called underscore start this is the default function we could also call other functions if we have them in my case let's take a look at the C code we had we had this main function which is what we want to call so by default in web assembly does create an underscore start function for us so we'll just call that and you could also have different functions at the web assembly module exports and we could call them so let's take a look at running this so I then remove the random 2. txe because that is what should be overwritten over here and now let's try running uh the B code that he have and this indeed B and I have a random 2. txe as well so we just took a look at compiling web assembly code running it in embeded environments and this is the duoling around all that we talked about that happens in the the H up until now we took a look at having web browser and that's pretty good how we can findun webm modules on the browser but uh let's can C thinking about how we can turn web simply out inside the browser and up until now what we took a look at is uh we have some python C rust code or whatever language we have and we convert that to a webs SMU module and uh finally we will be running this webm module this conversion has quite a lot of sub but right now just see we going from a source code to the web SMG modu and this webg module then require some GS glue code to be able to run it on the browser so uh so this is what we used to do when we wanted to run webs on the browser and we already took a look at when running webs SM be on the web we still want all Gable and secure way to run the same code across all machines uh a lot of stress on the same code across all machines and if you think about it the browser has a limited set of capabilities of what it can do and what it can't do so there will potentially be new challenges in running this in a secure way uh beyond the web what do I mean by being safe and portable is uh we want the users and programs can do what they have the right to do and not create problems or any other users and this also uh works for weing modules so what do we want to try and to is uh have standard platform independent methods to do this and uh uh we also wanted to be backform so so the same webm volume can be run across all kinds of devices we didn't would have to think about this in the browser because it did not have the set of capabilities to interfere with other kinds of programs and often whatever the web browser was being run would often handle that for us so now we need to think about these new challenges which come when we try to run WEP another thing we want is binary compatibility so this is a big set of Fairly straightforward wants and uh these also Mak sense this because of the we promise s up so we want all all these set of things when we try to run WEP the web so first let's uh talk a bit about system interfaces and how system interfaces come into play there are different production rings and uh so we can only have uh the Kel talking to the device drivers if you let say any applications want access to uh access to the system resources then talk through the Gil and the Gil will allocate just resources for them so this was how n uses production TRS and uh the way this happens is the way applications stop to curly is through system interfaces so we have the applications and uh these make system calls are to the K and the kill then has access to Hardware resources so that g can allocate these Hardware resources for all the applications so this is how system interfaces come into play this is also what almost all applications use system interfaces for each architecture or for each Target will be rather different so let's say you have some C code and you try to compile it down for a particular Target or for a particular let's say m contr so the way system calls would be done on that would be rather different than something else and if you want to do system called access hardware and access other kinds of resources so this is why getting portability is not such a straightforward problem to solve because system calls on each architecture and each Target would be rather different so this is also how standard programming languages like C are compiled down to so they use system interfaces or system calls from the particular architecture or the particular Target you are compiling it for now or simply this is different we don't know what Target we run it on as we talked about system interfaces for all Targets can be rather different so this is something to think about first of course you might remember how ja does it which is all popular so what Jaa does is it has a Java virtual machine whenever you compile down something it's compiled down into something the gdm can take and then when you try to execute the Java program in real time then G uses the compiler intermediate code and Dan that and this is now portable across all things because the compilation process just needs to take into account the way gvm does system calls and then gvm does it for other kinds of architectures so this is kind of the first thing that comes to mind and this is also very similar to what we soon be talking about so it does make sense to do something like the gvm and at least take inspiration from jvm that's see something likely so we explore how we can do something like this pretty soon so let's take a look at system interfaces so what I'm just done is listed all the system interfaces that is required when you run a list command and uh you also see open there so system interfaces are definitely I use it for the file system or using any of these resources now that we talked about a few of the things we could think of about how we could run withb smmd so one of the earlier ways this was done is using mcrip so mcrip was for running web SMG on the browser but an IDE way to take this forward would be you could probably emulate a browser on some host device and still use mcrip what you'll be doing is have a web assmbly module that still runs in a browser and the browser is being immuned across whatever device you want to run it so still get to in your application are compiling to web you still get to be able to work with the standard set of system codes but it can run everywhere and essentially your n ties will now reimplement the GS new code M the browser so this was the one of the earlier ways that web assembly was beond the web quite a few years ago and this also made sense just because of the way we talked about web smv all the web so this approach also was a n extension of what we would be able to do a problem with this approach is you think about the we simply what and then you think about ulating the GS blue code and ulating the browser and the emulated browser then talks to the kernel and then the kernel gives resources to the emulated browser which then in turn gets us resources for our web running our webs module so this already looks quite happy and through the told this quite happy it also turns out to not be performant enough but at least at the moment we understand uh how we sh was run beyond the web in the older days and why this kind of approach also makes sense to think about so we take a look at how you can performant run rively beyond the web and we'll also introduce something called web assembly system interface so earlier we take a look at wasi our web assembly system interface this video we'll take a look at demos with web assembly system interface particularly we'll be taking a look at two demos with web assembly uh system interface and was first off we'll take a look at a very simple hello world example and then a more complex example where we want to write down files read files and interact with the file system so let's take a look at that first off let's take a look at a r example I also have more examples over here so feel free to to go through them I'll not go through each and every one here as the name suest this is a very simple rust example all this does is Sprints out hello world to a CD out and this does this in do and then waits for a second so this is pretty simple and fairly straightforward to understand now what we'll do is compile this with wasm plus wasi so let's get to doing that first I'll add a Target I want to compile this for wasm 32 minus wasi so I can use the sub to add this taret so let's do that in your case if you not have this target insult R also insall now that we have the target added let's move to where our R project exist and now I can simply do cargo build you might have seen cargo build earlier and this is pretty simple but all I'll do is just specify the target as was 32 minus oh another pry quick and it say it has compiled it for was 3d2 minus so let's take a look at the verion UN produced so that should be darker uh was 32 minus was de and my project was called hello world minus RS I compiled it so it should be called hello world minus RS was so yeah I do have a was plus wasi we simp mod over here great now if you remember from the earlier videos this is a was plusi mod so I can run it simply with any wasm run time and I don't need any GS glue Cod I just need this wasm modu and I can run it that was the whole idea of where simply and wasi so let's try that out I have wasum time you can choose your favorite wasum run time so I can just do and run this with the wasum time and hopefully this should print out hello world a few times Well infinitely in a loop and uh wait for a second before each of them great so that did work out let's also take a look at the webm text format that this produces so you can produce WebMD text format with a bunch of tools there are quite a few tools to do that there's also wasm tools that allows you to inspect and create webm text formats from these wasm modules you can also run the webm text format with any of these wasm run times as you may have expected so yeah let's take a look at the word that we have this is the web assembly text format we produced and I particularly want you to see that this does use the functions or methods are the wasi spec C for example you see FD WR over here so this does use the underlying was methods so FD WR is actually the one that will print something out to SD out and you see that it actually does a print over here so indeed this is using wasm plusi under the hood now let's take a look at a more interesting example we'll take a look at an example where we do this with C so first off let's see what we have this is my I code uh this is also fairly straightforward to understand and this I should replicate some of the capabilities of the Linux command CP this copies a file from one place to another are simple as that and there's nothing different about this C code there's nothing which is like specific to was and plus it's just noral C code that you would write uh normally how You' copy files how you would write out files how you read files so there's nothing different in the secer what we can observe is that makes use of the file system so for example it D read from the file system and then drives right to the file system as expected CP should do that so we'll take a look at how this works with the context of wasm plus wasi because we earlier also talked about wasm sandbox and ideally wasm what you when running wouldn't have access to the file system so let's also take a look at this and how wasm plus wasi comes together with wasm sandbox we'll take a look at that in action we already talked about it in previous videos so let's take a look look at that in action I have a version of cang and all that does is when you ask it to compile well it ises wasm plus wasi the compilation process and produces do was and binary great so let's do this so first off I help wasi SDK to do this was SDK is a collection of tools one of the tools it has is cand well modified San to do the compilation process so first off I'll just uh said a few things and U I want to uh set the B to my V SDK so let me do that quickly well I have the latest version of was SDK at the moment of recording this video so just passing the part to was SDK what I really want to use from was SDK is one of the tools uh the tool I want to use is San so I can just make a utility for it and I'll also POS the cot that and what SDK also gives me that so this already assumes that was the SDK installed there are quite a few installations that we assume you to have already installed which are in the company GitHub repository so take a look at them now I have this utility to compile myc programs and let's see this an action let's try to do it for so I called out C and I'll also was the module I wanted WR out to so I'll just make a new one and call it copy files minus c. was it so I made a minor type over here I wrote it as Bing so let's change that to bin great and now uh let's compile copy files. C okay so it has actually compiled it to wasin plusi module and let's take a look at what it has produced so this do say it's a webm binary module so let's try running this and um again this is a w plusi module you don't need any accompanying JS glue code and you can run it with your f at wasm run time the way we took a look at running this with web assembly earlier was passing in wasm time and then giving it the ver module we have see our C code so r c code also takes like two command line arguments right so let's also pass in the command line arguments and my command line arguments say from and so I'll also pass that in uh I have a very simple file over here called random. txt and uh this is just do demo printing something it has some text great so let's try doing that and let's TR running this and I also need to go it to command line argument so I'll just say random. dxt and I'll call the other file random to.tx and this should copy it well it says no such file or directory can you think why this might happen so this is expected right the BM sandbox is an option it does not allow me to get access to the file system itself so we expected this and now we explicitly need to give it access to some directory and allow it to read and write files from there so let's try that out the run time where our web assmbly module is running in the bosom sandbox we now also have access to the files so let's try that out and I'll just pass in Min fin so that gives us access to this and then I can just try doing the same thing so copy files when C.M and then I have the random dxt I'll copy it down. dxt and uh that would have worked and yeah that does work so we also saw how wasi and the web assembly sand all work together so that's about this area in the previous seros we took a look at web assembly system interace are Wasing and we inter interview to a look out why it's needed it may appear as a very rudimentary solution so to say they or a very simple sixtion and it might not be very clear how it fits into the whole web simply ecosystem or even it might not be so clear yet about supporting all kinds of different modules and all kinds of different applications that people might want to compile down so at the moment those might come off as a few things with was others so what we actually took a look at was the preview one version of wasi the preview one version of wasi if you think about it it was just very close to an operating system here but then as the community progressed and we need a stronger set of tools and also structured Tools around web it became pretty clear that having wasi preview one like we talked about would had some pretty big limitations and if wasi truly wanted to live up to it seated goals it would somehow need to change we still want everything which you talked about in wasi preview one or posy as you talked about in previous videos we still want those things we probably want to do it pretty similarly because that seemed a pretty nice or decent way of doing things so we want to do it pretty similarly and still need the same goals but just having like this virtualization there which is very close to the operating system but not solve everything so we did have a few problems with wasi preview one and uh which is where as you might have guess wasi Preview 2 comes into place in this video we'll actually talk about wasi Preview 2 and was X if you are around the web Community uh you might have heard both of these terms quite a lot especially at the moment of recording this stud these are quite popular and quite hyped up so we'll talk about these and it's pretty simple to understand about them now that we know about wasi so let's start by talking about wasi preview to so what wasi preview to does is just think of it as like a rework of wasi and um it allows you to do wi something called wit where simply interface types allows you to work with was components and allows um a variety of new standard interfaces now we talk about to things with than was and components so we see that mention quite a lot because that is one another the solutions to having like the structure tooling around we and me we haven't really talked about it far we yet uh we'll talk about it in a lot of detail in upcoming videos especially about with and wasen components and why you even need them so I'll just say keep in mind about prev do and how previewers built around to support wasum components and when we talk about wasum comp do remember preview so wasi or preview do allows you to use all use VM components and use this new standard system interfaces but what it doesn't do yet is provide first class perameters for common things like aing or just doing multihost or some kind of distributed linking of programs so those are yet to come and if you see like just the wasum community or or discussions around uh the wasi community that's supposed to land in preview 3 because a very important problem even if you do have like the structured tooling is even with prev to or even with previous was plusi Solutions it wasn't possible or it wasn't very easy to have one module interact with the memory from the other module so that was a bit hard and this is especially makes things like first classing perimeters and multi-host linking bit of it Challenge and problem the way was is structured is that you can have nested virtualization mirers so what you can do is let's say have some parts of your uh system run in wasi preview two or upgrade from wasi preview two to a preview one to preview two what you could do is have some kind of shim that allows preview one code to or wasi code to continue working in hosts which only Implement wasu preview to so it also works pretty well well and you can think of it as just like this virtualization here well all of this towards having a wasi 1.0 so let's take a look a very rough overview of how was time implemented wasi pw2 was time also has quite a few interesting examples on using prut I almost certainly say look for that it seems like a quite a bit diagram let's take this step by step so very important thing to remember is that wasi prw 2 is Quil on top to of both the component model and core Webb specification so you can think of this diagram as everything that's coming to was preview to and also what was of time already implemented this is also taken from the was of time docks so you can just see that first you have the core we andv specification and this would have quite a few things like the core wasm threads prototype uh wasm GC which is part leer and core wasm thread shipping which probably comes out some dat stage so you have this core web assembly specification layer and then you also have the component model specification this is mainly around handling wids making component instances component definitions and those aspects and then you have the wasy layer as well and the wasy layer also interacts with the component model so you can see that you have like these interfaces uh which have been adapted to use high level types uh which would then be defined by your component model so just a rough overview for you to understand uh these arrow is not component model to was right now is component model allows you to specify interface descriptions and uh specify a grouping of interfaces we formally put this together a bit later but right now just understand it as defining interfaces and defining some grouping of interfaces so what you can see with these arrows is you have like interfaces which would adapted to use high level types or even new custom types that are defined by the component model and uh these would be defined by something called wit and wit is like this interface description and this would also include components like was iio wasi sockets wasi clocks wasi random or wasi file system all the ones you see over here so this is how it essentially comes together you also have the core web ass simply specification you have the component model and you have voice as well we particularly take a look at especially this part has just highlighted right now how component model interacts with VY how the Linker comes into play we'll talk about those aspects later this is what VY preview to proposes with that let's take a look at v x so wasi X is along the similar goals of having improved tooling and better tooling around uh web assembly and wasi but it takes a bit different approach this figure taken from WX is a nice representation of wasi X is a super set of wasi or more cly a super set of wasi preview one so you also have some kind of backward compatibility with VY code base so VY code should still compile against v x was X is just like a super set of so so that should work well and hopefully there will also be some forward compatiability with wasi Preview 2 and later when wasi preview 3 come out or wasi one comes out mainly what wasi X does is are the goal of o x who is originally to provide minimum capabilities for people to compile their apps and there were quite a few things which are missing to compare down all of these apps to wasin plus wasi so wasi X wants to expand the capabilities of wasi have support for more kinds of apps which can then be compiled down to wasi X and uh one of the things that the work with is introduce support for something as simple as the four existing call and which wasn't there in wasi preview one and um I remember seeing a very interesting open source project where someone had built a b with Wasim plusi and that was made a lot easier because B usually realiz and for quite a lot to execute all the commands and having like these minimum capabilities is really important to build all of these basic applications are start compiling any useful applications with wasi X4 have is your application binary auditions are frozen when published and uh then those would be solded by different run times you have so if you take a look at all that BX has it has a set of it has support for networking system calls like soet bind and connect un build htb servers to toky your stuff uh a lot more easily it also has browser support which is also pretty interesting yeah this is we were just talking about for can we for which is also some of the system calls that wasi X introduces with wasi you also have a ton of other useful system calls for multi-threading and asynchronous on times so that's what wasi x does and that's what wasi preview to do so hopefully now you can better understand how these improve the tooling around web smly and in later videos we'll take a look at something we talked about quite a lot today component model we formally take a look at that and some of the new videos as we mentioned that in this course we'll be touching on the cloud native aspects of web assembly and where and how it all started uh for the cloud native Community to get hyped up for web assembly uh I think this particular tweet that I'm showing or Expos you might call it now is something which is very significant and that really brought up a lot of things around the cloud native web assembly thing and setting up something which in future actually happened so in 2019 so this is this is the time when uh the first blog uh was published with respect to vasi like you know vasi is coming to the picture now what web assembly system interface will be able to do how uh basically you will be able to access the file system using vasi for the web assembly module that he want to run on the server side of things this is where Solomon hikes founder of Docker uh tweeted now this obviously this is important because Docker has laid the foundation for the containerization era or accelerated the adoption whatever you want to call it with the ease of the developer experience and then lays down the foundation of cuber edes becoming the default container runtime over there for a long long time so coming from Solomon means a lot because he developed a certain technology and here in this particular tweet and it's it's a very popular tweet like everybody in on the server side of web assembly almost knows uh this particular tweet and it has been said at various conferences so it had to uh be included in this course as well so as you can see it's for March 2019 if wasam and wasi existed in 2008 we wouldn't have needed to create talker that's how important it is web assembly on the server side the future of computing a standardized system interface was missing let's hope vazi is up to the task now this is very very very important because it's coming from Solomon I mean just imagine if Docker was not there so that's how crazy it is but obviously since it came from Solomon so there were speculations and there were lots and lots of questions maybe in your mind to if you are watching the video like if wasi is there then should we start consider ing or replacing Docker or this uh Docker getting abandoned all at once but that's not the case because in subsequent post he mentioned so will vam replace Docker no but imagine a future where Docker runs Linux containers Windows containers and vasm containers side by side over the time vasm might become the most popular container runtime Docker will love them equally and run it all now the fun thing is this tweet is from 2019 19 and moving fast forward to October time frame 2022 Docker released the premum support for web assembly containers which means you can use the same Docker CLI tooling the docker desktop to actually create web assembly containers which are the oci artifacts push them to Docker registry use the docker run command to run them I mean this is the thought leadership uh someone who created a fantastic piece of technology appreciating another fantastic piece of technology out there and this hyped up a lot in the cloud native ecosystem clouded community and eventually it became the truth like in 2019 it just predicted it will happen and it actually happened in 2022 and that's where the real acceleration happened because now the thing is that you have the same tooling you have and you can use the same tooling that you have learned over the years to even run web assembly or create web assembly modules uh so that is a very significant Milestone uh when we talk about web assembly and Cloud made now when we talk about the cloud native ecosystem obviously we cannot skip the containers part and the docker part in that also then I explained the docker thing that you know Solomon hik tweeted so and so things and then Docker announced its preview Port uh let's try to understand first the difference like people saying that web assembly is replacing Docker and stuff like that so let's try to compare web assembly and Docker so as you can see the docker which is installed on your host operating system so basically you have your infra and you have your host operating system on top of that you install talker engine and then you have your applications with its libraries and dependencies deployed as containers on the other hand when we talk about web assembly so you have the infrastructure host operating system and then you have the wasm runtime uh wasm Edge wasm time Etc and then you are running the web assembly module and for any of the interactions that is there with the host is start using the viler which is the web assembly system interface so that's how it is done so let's try to compare it um speed wise yes VM is much more faster due to the smaller binary sizes and instantaneous startup time so it's pretty fast as compared to Docker containers it it's smaller than the docker containers like it's in few MBS and the docker container might be in you know multiple tens of MBS for the same module that you're trying to run web assembly module is the compiled finer that you are running in the end whereas on the docker hand you have its dependencies Library it's a whole ecosystem like it's a virtualized operating system layer that is there uh you can exec into it and you should be able to see all the bin all the other folders as well portability wise vasm module is platform agnostic that means you can run it on any system irrespective of the architecture but the docker containers are architect specific so you have to make the docker containers separately for different set of Hardwares and certain set of Hardwares do not even run like Windows Linux you know those kind of mix and matches won won't happen very easily so I think those are some of the features with we can differentiate the docker and the web assembly ecosystem uh but I think it's more than the differentiation like I just brought it over here since many people think the docker and the web assembly ecosystem as you know something it is replaceable and things like that but I think they both go well hand in hand like for long running processes you have doer containers and for short lift uh you can have the web assembly uh modules which are there on the components this is even more interesting so Docker and web assembly so Docker announced the preview support in October 2022 and since then it has been increasing uh its support uh making it more stable and stable adding more run times to it and it is done using the Run vasil layer uh so basically the request how things run here is uh so when the request comes to Docker it passes that to container D and it says container D here on the container uh but container D also doesn't start the container uh so it actually passes through the container D shim and goes to the Run C run C is the low level run time that starts the container and then again via the container DM it passes on the status to The Container so that shim layer is now replaceable and it's now a containery project called Ran vazi So in that now if you have the Run vazi shim that will be able to differentiate if you want to run this particular container using the web assembly runtime or you want to use the uh run C so basically some configuration changes at the container d. noral level that you can do and where you can specify this particular runtime to be used and that runtime can be the web assembly runtime so I think that's pretty neat and that opens up a lot of gates where you can use both the power of containers and web assembly hand in hand it gives you the opportunity to use the same tooling because education has been a major Gap in the adoption and now since you can use the same developer tooling that you have been learning for years which is talker incb is you are able to now with this particular feature set use the same tooling to build your Docker containers to build your web assembly modules as oci artifacts push that to Docker registry or oci registry and then run it as containers or when you come to kubernetes as well you can run it as standard deployments so that's how it runs again this is the same thing that I just said so when the request comes to the CLI it goes gets the image and then it tries to start the container gets the container ID Docker D passes it to container D container D passes it to the shim and shim goes to the runtime starts the container gives back the container ID creates the task and then attaches the container and waits for that to exit so that's the kind of process uh I think it neatly explains um the overall uh flow of how the docker container works and wherein the exactly know you add a new shim over there and you can you know play around with having multiple run times and targeting to different run times and run your Linux containers and web assembly modules just extending that part web assembly and kubernetes now again I told you the docker coming into the picture runvi coming into the picture it opens up a lot of gates and now you can use the same kubernetes cluster to even orchestrate your web assembly workloads so you can have a node where you can configure the web assembly runtime and you can configure the container d. noral F and you can configure that have a runtime class and you should be able to follow the same flow because in the end cuade passes all the request tells your CRI in CRI if it's container D then it follows the same process it goes to the Run vasi layer and then the wasm run time and then starts your container and then it is running inside a pod so I think that's pretty much the same that will be happening on cubes it actually happens and we'll do a deep dive demo as well from scratch so in cuberes you can have different node in one set of nodes you can run your web assembly workloads in another set of nodes you can and run your regular container typee workloads with the Run vasi release 0.9.0 you can actually run in a single pod a Linux container and a web assembly module so I think that is also pretty dope just quickly trying to understand what needs to be done when we talk about web in cuetes so you have container vasam Shams let's say you have your vasam Ed spin spin Shim vasam Time spin slides shim uh you can have different set of shims uh then you have to install the you have to have the libraries and stuff for the different run times on specific locations and then you need to change the container d. tomal file in that you need to actually specify the run times if it's spin if it's bage and then you have to give the runtime type it is also dependent on the kubernetes distributions like if it's k3s then it's you know c. container d. runtime. Spin and if it's the whole regular QB ADM type of cuberes cluster then it's standards plugin IO container DGL pcb1 CRI container D runtime Spin and then you add the run times after all of this is done you restart your container D you create the runtime class and then you label that node in a specific way so that when you create a communties workload so you are able to provide a label selector to select and match and make sure that it goes to that particular node with a particular label where you have configured web assembly in that way you should be able to run the web assembly workloads inside kubernetes so just finishing up the theory part so that we can move on to the very amazing Hands-On demo where we'll be building everything from scratch and all the way after to kubernetes so all the steps that I just explained for you to be able to run your web assembly workload on kubernetes can be automated in a very easy way using a open source tool called kazm so kazm is an operator to all the previous steps in an automated way and we'll discuss more about this obviously when we do the demo so now it's time for demo and in the demo we'll be creating a application a rust application from scratch and then compile it to web assembly and then try to run it and then try to dockerize it try to run it by a Docker and then try to run it on a cuties cluster so let's do this end to end for this application creation there is a framework that we'll be using called spin so spin is an open-source developer tool for building and running so less applications powered by web assembly it's a framework that lets you easily create applications and it has support for various languages to install it's pretty easy to can just do Brew tab Fon slab and then bre install F on/ tab SL spin since I on a Mac so that's the one I'm using but there are other install me methods via the installer script as well so that you can find on the dogs on the developer. fer on.com Spin and I have already installed Spin and you can can see that so this is spin at the time of recording 1.5.1 version and you can see you can add a new component to an existing application you can build the spin application publishing to the form on cloud so that they have their own cloud offering as well then deploy package and upload the application doctor to fix and our point of Interest lies in the new command which is the scaffolding of a new application based on a template and then you have other set of templates registry plugins pretty cool plugins you can create your own plugins as well and spin up to start the spin application so let's try to do that and let's walk through and see what it says so pick a template to start your application with so it has various templates so you have C go green JS PHP yeah PHP we'll do what the web ass Community loves most which is rust so let's create rust application let's name our application rosm course description for Ros course the only course you need and then we'll just leave it as it is that's it so we can go inside RM course and you can see there are a few files which are already created now this is what we call skeleton so the the skeleton of your app is already ready so it gives you a simple skeleton of your application which on top you can build with your own business logic so you can see you have a cargo. tomal file so you have a package and it has a name author description and then you have uh libraries so create type cdy lip dependencies and then spin SDK so all these things are there and then the interesting file is spin tal fight that actually defines how your application should be what all components your application are using when you build which command it will be building uh so all these things are there so spin already uses components so you can see the components which are there and uh this will be the VM co. wasm file that we would want to run so what we'll do is we also have a source directory so let's go into inside source directory and you have a lip. RS it's a simple rust file with request response HTTP component so it has a simple spin HTTP component and you can see it has a function called handle vasm course request response and with a print you can see the status and stuff and in the body it says hello formia so let's change that to hello BM course so we have done that what we'll try to do is we'll do a spin build now it is building and what we saw in the spin. toml file it is using the same command same using for rust so we use cargo it is also using the same command cargo build hyphen Target vasm 32 vasi and release so this will build the file and then put that into the target folder and create a specific dot wasm file that you can run on any platform where you have the web assembly runtime installed so the build is now complete now you can see that there is another folder which is is Target so let's go in Target and let's go in ROM 32 wasi and we can see in the release we have wasm course. wasm now what we have to do in order to run this application we can simply do spin up as you can see it is serving to Local Host 3000 we can check that in another window we can do a cur to this and we can see Hello Bon Cod so fantastic fantastic this works this works fantastically and you can see the invation happening over here the next steps now we have created a spin application we have actually run this application using spin itself so and we can deploy it to spin Cloud as well but we want to build a OC artifact which is a Docker container and run it as a Docker container and ship it to the docker registry so that we can move ahead with our cuberes goal as well before doing that that we can also try a very simple rust file use cargo and then use one of the vasam run times to show you even before this like how how it looks like so what I'll do is I'll go back One Directory I'll create a folder bosm cargo demo and we'll do CD into that PLM cargo demo we'll do a cargo new demo and it has created a demo it has created a source file and it has a main. RS hello world and we'll do a hello from Cube simplify and what we'll do is we'll try to run the same command of cargo build and create a web assembly Target for it and you can try to run it as well cargo run main. RS so you can see cargo run main. RS runs hello from Cube simplifier so this is this is pretty simple okay this is pretty simple this is the the absolute base now we'll try to release it the release is finished so let's go back and we can see a Target folder is there and we can see again vam Bazi 32 uh release and then you can see demo. wasam file over here so we can use wasm Edge wasm Edge run demo. wasm and you can see hello from CU simplify as well so like I said you can simply create your own file your own code this is pretty simple code the the one that we created using spin was rust sttp application that you'll be able to serve and here you it's simp simple demo. wasm hello world file that you were able to compile using cargo itself and create awm file and then run it using any web assembly runtime and this particular case we used FM Edge okay now let's go back to our spin application now in order to run the web assembly application using Docker you need to have I think version greater than 4 4.21 and you need to enable the feature because it's still in beta and it needs the enablement so what we'll do is we'll go to Docker we'll go to the settings and you need to enable the docker extensions and in the features and development you need to enable the using container D for pulling and storing images because this is the place where you can see it has the ability to run vasm container so this is the features that you need to take box and apply and restart so that you can run the web assembly containers using doc now before that what we need to do is we need to build a Docker container because right now what we have is awam file we don't actually have a Docker container so first let's try to edit the spin. tomal file and see what we have so before creating the docker container we need to add the dependency section in the spin. tomal file where we specify the spin SDK and we specify the WID bind gen rust so these two things uh have to be specified in the spin. tomal file then we draw to do a spin build spin build is done then we create a Docker file in the docker file you can see we have from scratch we are putting spin. tomal file and we are copying the target vum course wasum and the target vum 32 vasi release vum course. wasum and the entry point is spin. in order to build the image we'll be using Docker build X build platform we specify vasi V aome and then we specify the registry name in my case it's s 911 and then the image name with the tag so in order to run the docker container we should specify Docker run with the runtime container D spin V1 platform vasi vum and the port 380 so that tells talker to map spins 80 Port inside the container to the Local Host 3000 and that's where you will be able to access it so we can access it using like a different C request and we can see that loc 3000 is working and it says hello was some course that's what we defined when we built the docker image we can actually uh do a Docker push of the image wasum Force V1 and our image is pushed so what we'll try to do now is we'll try it on a kubernetes cluster so how to do that let's do that and we'll be doing it in a way that you can also try it on your own so this is killer Koda kubernetes playground it is a two node cluster that you get so you can see you have two node cluster what we'll be trying to do first is configure what we discussed like you need to have a web assembly runtime libraries and then you need to edit the container d. normal file and then you need to restart container D you need to have the shim properly placed you can avoid all those Thing by using kazm Dosh that's what I also told you about so kazm is a cuties operator that adds web assembly support to the kubernetes nodes it does by using the container image that contains binaries and configuration variables needed to run pure web assembly images you can see a lot of stuff is already supported so what we'll do is we'll go to the quick start we'll do the helm repo ad of the operator we will do the helm install of the operator and the vasm km operator is installed so we'll do Cube CTL get thoughts hyp a and we can see that the container is creating container is running so let's clear the screen and now we need to annotate the node so basically any annotation that is added to a node the operator will pick it up and configure that node to be able to run your web assembly workloads so in this command what we are trying to do is we are trying to annotate all the nodes so that it configures both or all the nodes inside the kubernetes cluster and make it web assembly readit it will be creating a job so we can actually see fors hyph a we'll be able to see the containers provisioning for control plane and for the node one so it is trying to configure both of those and it is it has already completed for node one we can actually check it so if I go to a new tab and I do SSH node 01 now I have in node one we can see the c/c container the config dotl and when you scroll down you can see all the shims added so you can see the Kazam container D shim spin obviously these were not there because it's killer Coda Plaine environment that you get out of the box but but after installing uh km and annotating the node km operator automatically configures everything for you and restart container d as well so both of the control plane and node 01 are completed so what next is to create the runtime class so let's create the runtime class for Spin and we will do this it's a runtime class wasm time spin so we'll create that runtime class runtime class is created did what we'll try to do now is create a deployment. yaml file so this is the simple deployment file so we are using the same cilities concept we use the same Docker Concepts to package push run the web assembly workload and now we are using the same kubernetes tool chain the same deployment file where we are defining the kind deployment giving all the label selector and stuff just we have added the runtime class that we just created and in the containers we added the image that we post for wasm course so let's run this particular file C CDL apply Ploy now when we do Cube CTL get pods we can see that the Pod is up and running Cube CTL get PS hyph hope wide will tell you the node where it is running so it is running on the Node one uh now we'll try to port forward this so Cube CDL put forward deploy was course 380 and now what we can do is we can do in the new tab C 127.0.0.1 3000 and you can see Hello wasm course so now we have successfully done a lot of demos so let's let's try to sum it up so we created a simple application using rust compiled it to Target web assembly using cargo and then ran it using vasam Edge that was a first scenario second scenario was creating an application using Spin and running it using spinup third scenario was dockerizing it and running it using Docker fourth scenario was creating a deployment manifest file and creating a kubernetes cluster configuring the kubernetes cluster using kave aom so that it can run your web assembly workloads and then applying that runtime class plus the deployment file and then seeing it running on a humanties cluster as well so this shows with the power of existing tooling and the power of container D run vasi shims that you are able to run your web assembly workloads using the same tool chain same developer experience that you are used to in the cloud native ecosystem using Docker and kubernetes making it o artifacts pushing it to Docker registry and then using it as regular cities objects like deployment and running it onto the cities clusters so I think that's a very simple demo and we'll dive into the more detailed and complex demos as well and now we'll talk about components in wasum and if you're around the wasum ecosystem you might have heard about compon component model in all of these are uh all are PR Trend in topics and they a lot word in this video we'll take an intuitive look at what components we how do you define a component and then we'll talk about why do we even need component model up until now we already saw what wasi is and how wasi opens a whole array of new possibilities now it might seem that oh but doesn't like wasi solve all the problems we had weer said the problem was system calls and was he solved system calls for us and now you're telling me that there's another problem so natural question is here you know how how did this another problem come into play why do I need to think about comp so first this is what a wasm module looks like you have some kind of sand works you have the wasm module inside it and you can roughly think of this as an object file and traditional compilation models but unlike classical objects uh webm modules can't describe system calls or reference any external symbols they can only take numbers in and put numbers out just like a traditional function you do some kind of computation on it and then you return something so in this sense wasm is not a classical object and and uh it cannot like reference any external symbols at all and that's about what wasm does with wasi we want to have this ability to do interfaces so we already talked about how Wasim module and wasi comes into play but I want you to keep this in mind that the was a module is only limited to like these instructions and right now wasi is only limited to these interfaces and notice what's missing over here what's missing over if I just tell you some instruction and interfaces is a better understanding of how processes are started how does a process start how does it interact with other processes and when does it end a better understanding of all of that is missing right now and if I just see this I don't know any of it so that is indeed a problem uh with with all that we just saw so let's talk about what we want to do with conference and was at this moment let's not talk about conference but let's talk about what we actually want with the model we described so in general we don't want to talk about what goes in and what comes out of a function we did that in previous videos we instead want to talk about types functions in themselves methods name spaces and all of this make sure uh how our function interacts or how processes interact with each other so web simply at that score is only able to exchange integers and floats anything more complicated and that has to be uh stuffed into the web linear memory and then pulled out again and hoping that both sides of the exchange know how to talk to each other and can survive these iterative changes if you make some change within the code that makes a web assembly module I then use that web assembly module in some other place because web assembly can just like exchange integers and floats H you need to make some changes on your own and then hope the other people who are using your module know how to survive those changes because you'll probably make a lot of changes how stuff is represented so that seems to be a problem uh if we really want web to be widely used we definitely need some kind of interface description language and if you know about interface description languages uh they have been really common throughout with software so we definitely need some kind of way to do IDs or interface description languages so now we talked about the problems and Sol the problems are let's see why component model can handle this exactly as motivated uh component model has something called wasm interface types and just uh sneak peek of what's coming next it is exactly an interface description language or mimic an interface description language a wasm component is simply a single typed object consisting of Co wasm modules plus corresponding withd definitions or the wasm interface type definitions over here what we can see uh one of the components so this is an example taken from the official component model will get up repository and what this shows is components can specify that they either export specific interfaces or require that other interfaces be exported so here we have something saying use p.p. poble and you see that right now with the was of interface type definitions we can get an idea of exactly what interfaces are wasm modle will export and what interfaces it requires to import what are the types of it and so on so with that we talked a bit about inter types but there are also something called worlds and this is more interesting than interface types so there's a larger ecosystem of Worlds we talked about singular interfaces right now but there is also a world and the way this works is this is just a standard Syntax for writing a world but the way a world works is I have some world and it says exactly what UTS uh what interfaces types it needs to import what does it export and so on uh so we also take a better look at this we'll have a demo and we'll also see a good example where this comes into play with bosy with some core system logic and so on so we also take a better look at the at this but right now you can just the S WS as a better way to put together multiple interfaces and have this larger ecosystem for better running code in one language and putting it and another we need separately compiled components built from Wasa modules so if you see what's happening over here if we really want to run code in one language and import it in another run some unrusted code we need these components to be separately compiled and built from these was modules component instanes must fully encapsulate the linear memory to truly be able to run untrust it from one place and just use that code or function in some other place this also includes uh potentially in the future uh uh garbage collector memory which is kind of a problem because these are immutable copied values opaque typed handles and we have some uninstantiated modules or components if we do actually include garbage CLE which is also why the component model right now assumes uh no Global interc component garbage or cycle collector that is able to trace through cross component cycles and uh so you so you don't have uh essentially a process like a garbage collector or a cycle collector that is able to trace to all of these component Cycles so so that is uh that is also a challenge when we talk about component instances being fully able to encapsulate their linear memories so that's definitely a tradeoff and uh but right now the reason why we need component incenses to encapsulate their memories uh is to easily be able to run unrusted code and still maintain the use of sandbox model another thing to note with these components are disruptors for component instances are deterministic so what does this mean we deterministically know when a component instance is going to be terminated and each component instance has to terminate so so this is just something we also get with the component model and each of your component is known to terminate some so soine question that might uh pop up on your mind right now is we talk about was body as as this nice way to or or like a global IR of some sort to be able to export code run code from other sources into another sources so a gen question that might B on your mind is how different is this from the component model and well we talked about like what more the component model uh if you think about it uh and if you're building an app just like this you can have like each components of the app be a was a modle of some sort write them in different sources and then bring them together the problem with doing something like this is we do not have like this process model being defined in the background so interacting with each of these Wasa modules becomes really hard if there's some kind of change with how the Wasa module represents things in memory uh you'll have to potentially make that change on the host as well and there's essentially like this one off contract between the host machine and the Baza modu so it becomes really hard to uh to do it this way uh on the other hand if you do have a was confer doing all of these individual parts of your application due to having like this General process model it most certainly becomes a lot more easier to have all of these different parts of your applications as wasm conference under the so so that's essentially how you should use wasm conference we we already talked about how sharing a memory between multiple component instances is uh is a bit harder so while designing such applications you most certainly need to take so the was a module aom component essentially has a separate compilation and deployment but you can like most certainly have an adapter mod will be a comp aom component also has fully explicit dependencies we know what kind of stuff it will use what what kind of interfaces it exports and so on and well a genuine question you might ask me is this won't be true and won't be able to indeed use it like a black box if there is shared memory or there is something happening which is not from within version and well that is true and that is indeed a trade off we have to make sure that the wasm sandbox model and and the other benefits of was which will talk about but in most cases if you do not need memory to be shared across these processes then wasm components uh have a beautiful way of you being just be able to use it like a blackbox and to use from a low level point of view a component model is basically like an ebi an application Bally interface much like L for or the executable and linking format so so if you know all of these very early advances you can draw really nice analogy between wasm components and things like if if you don't know about like the executable analytic format we'll also talk about what that kind of stuff means it's very easy to see what this brings for wasum and and what other software have been bringing for wasum earlier another thing we need to talk about is mod you linking we haven't completely solved the problem yet so module linking allows module should truly be composed so it allows some instances of any module and we can use these instances together so we'll take a better look at this example but module linking essentially allows you to put together multiple instances of any module and and use them together so what do we talked about right now is we already have like a version and we already know what this looks like with wasi as well so now let's talk about how modu LinkedIn comes into play and why we do need this in the component model so not that interface types already copies all the linking Concepts and you can use it to link core modules Imports or exports to adapter functions and you can also use interface types to specify how core state is in AB there you can think of like interface types more like a feature proposal that in somehow extends like what you link and like we talked about reference types that extended cor wasm earlier that is exactly what interface types do for us uh extend this idea of module linking and if you see hostes that do support uh module linking but not interface types interface types could also just be like an optional feature but what this allows us to do is uh use some system functions and uh use other kinds of language apis within our bosm component so we do indeed need uh interface types plus module link to truly make the competent mod earlier we had things like wasm link that allowed uh which is essentially a a web assembly module Linker it implemented the module linking proposal and most certainly direct the motivated reader to take a look at the wasm link project uh for early developments in the wasm space and well now all of this is capsulated by our component model so interface types is also solving this the way component model truly brings all of this together is have some core have some module linking and then some interface types so so we should be able to use all of this together for competent model to Truly Come Together get all the benefits of the comp model here's the same example again and if you take a look at uh this F uh of the code we have some interface type we have this adapter function we tell what to export what the parameters of it are looks very similar to the interface types we just discussed so this is the part about interface types uh we have the part about one linking as well we have instance of cod saying import lipy we have a V lipy and then we sunshade lipy the part about uh imported lipy Mallet and using the function export on let say is function exp will run well all of that is actually core uh but we have these instances of code which is import Lipsy and instantiate lipy and all of that is due to the power of mod link which we just talked about so let's talk about wasm interface types and until now we have really been talking about wasm interface types and intuitively motivating how they can be used but W packages can contain World definitions at the top level and addition to interface definitions so we already saw how interfaces and worlds are nicely come together and you can think of world as a complete description of w ws and exports of a component a world can be thought of uh as an equivalent of a component type in the component model as promised earlier here's an example of what a world looks like so remember I showed you the framework for what a world should look like well let's use the same framework here so World essentially describe like a concrete component and are the basis of any bindings you'll generate later so you can use a guest language when you actually run this in a guest language they'll use a w to determine what functions are imported what those functions are named and what functions are exported so so we can have like any number of inputs and exports and each of these inputs exports can either be a function or an interface essentially if you think about it uh yourselves it's just like this nice the S interfaces uh because we do indeed wanted like a nice way toing taret we talked a lot about like this exchange right uh between what functions are imported names of the function and so on we didn't really talk about how the exchange will actually happen within the confident model now that is indeed something we don't care about at all uh we don't care about the details of how the guest and host agree to exchange those strings but tools like with byen which is any popular to will generate the functions needed to do that that kind of marshaling for us so right now we are just concerned with understanding how these interfaces and functions are exported or imported and we have other tools like we Pine which we for the scope of this video we don't go into but those tools will actually handle the exchange for us so we talked about all of these aspects and all of this is very well extendable to wasi as well in your mind you should have already done this since we talked about wasi earlier so essentially what wasi does is if you have to make this wasi new we already talked about the component model spe we talked about the different things that the component model has but wasi wants to Define its interfaces in terms of interface types so and what that means is you see the wasy spec layer over here the wasy spec would essentially have to depend on the component model because its interfaces will be defined in terms of these interface types as we already talked about wasi earlier you already saw that the use of wasi isn't restricted to components and tools which are producing or consuming core modules today so would still be able to do that without the comper mod and we actually saw examples of this in earlier videos and also when you're using a wasi from a core module wasi basically looks like what it does today for you the component model factors out what wasi would otherwise duplicate in its own interface description language so we have like single place to describe all of this and of course when using web assembly system interface from a component you get some benefits which are component instances encapsulate their memory and handle tables themselves and uh components can essentially also virtualize wasy without causing a lot of problems or or a problem we generally call caller pry in traditional software overall what this allows you to do is eventually you can avoid deserialization with adapter functions at all so it most certainly using wasi with the component model makes stuff a lot easier for you uh as someone writing these Wasa modules and making that with most certain see examples of this but right now all we did is try to understand the need of component model the problems component model sols why would essentially look like a nice way to just run things bom uh it still had some limitations which we solved with the component mod and modu L so uh so so with that we come to the end of this video and next up we'll also take a look at how to implement all of this and we'll see a few examples of so now to put all of this together we'll take a look at uh this demo and uh and we'll do exactly what I show over here so we already talked about it which is the wasm interface type so first what we do is we have this Dynamic library or as you may know cdy R so the dynamic Library we use with b r to create a component we want so this will allow us to use the bom interface type definition and also create a component for us so then we right now are at this stage where we have a component and we already created the component from some B module I had from some wasm interface type I heard just so I could make use of functions and Ms and yeah everything okay so now I have a component definition and all of this is done before art none of this is pretty much Ed while running some un trusted code and now what I want to do is I have this Runner Runner is a completely separate project and let's say the goal of the runner is just to use some untrusted code some untrusted web assembly code from some other language I mean for the example we just make it consistent and have all of this in dust but yeah this go be like any language but what about that later so we have the runner uh what we can do is we can also create a component inance so one of the ways you can create a component inance is use with pen host and use a component encoder which allows you to read the component and adjust encode it with your wasm module so you could most certainly do that but that probably doesn't S the best thing to do you would always need to have Wasa module as well as with uh at then do this encoding while run time so probably doesn't make uh the most sense to do that what you could do what you might have gu you could do is you going create the component instance definition before so you can use the component incoder go from the wasm module and and also encode the component and then at runtime you can just use this component instance or run this component instance or Make an instance out of whatever component definition we created beforeand uh using aome runtime and this part you could like most certainly do in any languages so you could probably have your ver module Dynamic library and all of this done in some language run the component instance in entirely different language because then we just need to run the component definition and make component instance which is PR easy to do with the wasm right so this is the overview of the demo we be see I try to do exactly the same thing so let's get on with it first what I do is I have some goodd and first I start seeing with buen if you remember the diagram I start seeing with buen as one of the first lines in my code so what you're trying to do is I'm just using a very popular create on Rust uh and that allows me to render some B down so how do you do that you want to take a string which is something you wrote in mark down which is a string and you want to go to HTML right now we just say HTML is a string as well okay so that is what we want to do and the implementation for this is pretty easy I just have this render function that goes from a string to string I I don't write the mark down rendor myself I don't want to do that right now I just use a simple Dr now this line seems a bit familiar and I have a stru here I have an implementation here so so what's happening first let's see line4 we have WID Bon over here the WID Bon tells me I I want to use this WID and I have some world and it also tells me what it exports so let's find the word first and take a look at this word at this stage you already know what each of these things mean because you went through the slides earlier so we have this renderer world uh we have this interface which is being exported called mown and that has a hinder function inside it so in lip. RS uh we create this stock called my markdown and this will implement the mckown stru we had in our B if you remember I also had the render function in which it was exporting and this is exactly that render function I'm implementing that render function right now with this I have a word and I'm doing all these things so first what we want to do is we want to compile this uh make out was module so let's do that it's pretty easy to compile cargo projects so what we can do is just do cargo so let's do that so we compile this and let's Che out what our target has for us so we have the wasm 32 which is the target I specified and uh I also have some cash so now we have this host and uh let's take a look at the main RS so the first thing we want to do is use some component encoder and encode our with uh into the Wasa module we just created so this could also be a simple command so you can also do it with wasm tools ideally you would actually want to do it with wasm tools so you just have this command called wasm tools component new and using that you can just create like a component definition so there's no need to do this in time as we were talking about earlier I just want to show you how this looks like so I have my wasm module uh this is where my sites the module we just created so what I'll do is I'll use the component encoder and and I'll just encode the BD definitions and and the other component definitions we had and this will allow us to create a new component definition so now that I do this uh what I what do I want to do now I have this conf definition I actually want to run it with a wasm run time so let's do that uh so I'll be running this in wasum time and for that what I'll do is I first have this bingen and uh what this bingen does is it is just taking the wi we had earlier and using this uh W for for any function or interface definitions so running this now gets pretty simple and we can actually do it just using wasum time so that's what I'll do so wasm time has the ability to specify that you want to create a new component inance which you are doing at this uh in the highlighted line with what some time just allows you to take this component so that's what we do and then we have this s sheet so what this does is actually creates an instance uh the component we had so this will also use the world we generated earlier thewi files so that's what we have over here now I can just use the functions that I was exporting so let's take a look at our quit again and I see that it's exporting this function called render which I actually want to use this function is no longer and interface we already implemented this earlier so what I now do is I use this exported render function and I call it with some walk down and uh and then we just see uh what this looks like so what we'll do is uh we'll run this uh host code so for this I'll I'll not use cargo build I'll just do a cargo run I want to run this uh R this s code I don't want to create a module out of it just like we talked about the figure earlier this is actually what would happen when using the was module the was components creating a component insance out of it so let's actually do that and uh it should take a while to compile this with that we see it actually work and it does give me some string and this is indeed the correct representation of the markdown weard but what we really wanted to see is all of this happening under the hood so we actually created a component we had some wasm module we used the wasm interface types we created a component in sense and then ran it using the was time so all of this is what's happening in the so without we took a look at component model which is a pretty interesting idea uh with web assembly and maybe now you also understand why component model is useful in the first place and why we needed component model and what basic need was it solving so I hope you understand those aspects about component model and we also saw how to use component model web assembly and the all interface types there all Linker and there all all of these components uh and all of these subc components of the component model play and how they all interact with each other and we also saw how you can use component model for your own applications and mainly we saw how this could extend to using web assembly binaries but not having to worry about changes percolating on both sides so it being really hard to track changes uh when you make make a change in VM binary and some function changes and then you need to make changes in your host as well so we mainly saw how this was a nice solution to all of those problems and soled our really fundamental problem or something we didn't have earlier in we so that's about the component model and I most certainly urge you to also take a look at particularly how this works in the context of bosi as well as how you would extend this to let's say you have some new Goode libraries how would you add support for them so I most certainly invite you to take a look at these other aspects which you won't talk about in the course so only we took a look at the component model and the component model soled a lot of awesome problems for us now let's take a look at us in spin to create an composition of components so spin also to do this very easily and you might already know about spin earlier videos so let's take a very simple example of making a spin component and on so this is a very simple spin hgdb component and all this does is just serves at the part SL hello quite literally just write something so this is a very very simple spin htb component and let's try running this especially with spin V2 uh you have the ability to create and use these components on your and it's also very easy with spin to create component compositions which I think is the interesting so first I can do a cargo build so let's do and there lot of please slide uh now what we can very simply do is just run spin up as the had seen earlier so let's try doing that and at least this very simple example well pretty much all we need to get the component so the path was SL hello so let's try to SL hello and there it is just Sprints it out as we expected nothing really complex with this is how you can very simply spin components this for instance is one of the very simple pre-built components with Spin and U you can use multiple such components yeah that's also how you use a spin to create and use components so at times we do require to store the data when you're using spin uh you can actually use a key key value store and in this particular example we'll go through the key Value Store example so first is creating a new application so we do spin new and we'll create a HTTP rust we'll name the application as pizza so what we actually want is we want to add orders so we'll be adding the pizza orders we'll be getting it and we'll be deleting it and we'll try to see so we'll try to have a state in the key value store and at the runtime of the application we'll add remove and get from the API that's what spend does it automatically creates we have seen that uh the cargo. normal file it automatically creates the spin. normal file and the base source file now what we have to do is inside the component build the key Value Store over here so let's edit the spin. tongle file and go in the component go in the component P pza add this Now the default key value stone is sqlite so that will be used now what we'll do is we'll write a simple rust code so here's the simple rust code uh using the spin SDK the latest one and it has a function handle bizza so what it is doing the main thing you have to see is post so on the post method it should be added so we get store do set so and what is store store is the open. default so this is the code and you can see we have imported key value as store and you can see we are opening it over here and inside that when we do Post adding that getting the details from store.get and for deleting it's store. delete so those are just the three methods now what we'll do we'll simply do spin build and will start building it and actually what it is doing it it's building using the regular cargo build i f Target so once it's built what we can do is we can do spin up so once this is up and running we'll go to a new tab and we'll try some call commands so let's try out the get from order one like we haven't placed any order yet so it should be a 44 which actually it is so it's a 44 on the order one uh let's try to add something on this order we'll use the post and we'll add pizza pepperoni extra cheese uh for order one it says 2011 created now what we do we again try to get the order and we can see we have successfully received the order and we see Pizza paper only with extra cheese we can place order two with no cheese and we can check for order two and we can see it's no cheese we can delete the order two and it's deleted if we try to get it again it will give the error that it's 4 not4 because we have removed the order so that was a quick demo on the KV store how do you spin KV store and how you can have some State you can read from State write to a state get it uh and delete from that as well and the default one we have used over here is SQ light so now we'll be talking about inferencing machine learning models with web smmv which has become increasingly popular today due to the various benefits we talked about there have been quite a lot of approaches about doing this and web assembly there have been approaches where you compile parts of tens code parts of fou code base completely into webm and there have been multiple different kinds of such approaches in the past for this video given all that we have talked about context of wsfd we be talking about wnn which is a modern way of the machine learning inflence with was and uh this should be particularly straightforward to understand based on what we have been talking about so a lot of the challenges that web assembly solves are very useful for such kinds of machine learning R types so we have the web assembly modules which is being created as you do create it you have the wasm run time and then just like web assembly system interface you have znn with another set of system calls that are required to for example use the GPU or use other machine learning specific operations and then you have machine learning back and under the hood which Powers all this and we talked about how we simply uses the Linker to support multiple such backends as well that's also how this works and uh wasn supports multiple backends andow P chip and so on so under the hood you still have those epis you can use them within your web simply modules so that's a quick understanding of how znn works conceptually it's pretty straightforward to understand and given what we have been talking about let's take a look at a very simple example so the way we do this is I have an application here some simple R inference code so we can take a look at this and we use multiple functions some wasn so for example at least at this example this is a very SW model so I run it entirely on CPU I use the p spon and this piece of code allows me to load in the model itself and then vnn also has DPI for us to do inferencing that inference levels which we then show so wasan in simply has apis to do these kind of aspects and the way it does this is simply uses the P Touch back neh so you have this wasn as a layer of API by the by tou back that you can use in web assembly following what we have been talking about previously so that's was in indust over here we say we want one B size inputs and 3 comma 224 comma 224 images yeah we want those kind of vgr images so that's what we be do and I have standard boiler PID code for such kind of simple image classification models so we most certainly interested innn but we aren't very much interested at least right now about how this model is exactly bu this one is a mobile net model you could most certainly do this with all kinds of models you also have need to do this for llms and you have inbuilt API to do this forums as well so now we can take a look at running this very simple good example like in set of just running a cargo bird so can do cargo bir minus Target was 32 minus wasi so now what we can do is use was C to run the PF code so let's first see where what this generates for us so this should be minus wasmus was and example M image name model that wasion so we can take a look at this and we do have assemly module generated over here so this is what we can use and you can also use the wasm ETC utility to you decompile this if you want to well this printed out quite a bit of it but you can simply use wasm Etc to compile this down to a code as well so that is about the r inference code that we had and what I also have is an example for us to take a look at we can just see that we do have an input image and I also have a pre-processed image in the format that we require the pgr channel format that P requires at 224 by 224 theze to that size so I already have that image over here now what we can do is run this as you would for any other the web assembly module so now let's try to inference on the simple R example and our web assembly module that we had so we can inference on this as of with any other web assembly module so we can First Watch minus minus there with the parts that the weing the sunbox has access to and then pass in the model part that we have I have two models over here name model and standard model so you can also use name model features with YNN and Edge and then just quite St for it to understand as of right now let's just I inference with this uh next up let's go the part to the model WIS which I have just show here and then I have this example image this are started inference and this will soon print out and inference it does however this is mainly to show that it has been able to read the image resize the image convert it to the B size we want normaliz image then create the graph create the wasian and execution Contex text which we shared earlier and then actually do the inference and you could more certainly try this for larger models yourself as well now let's talk about vum observability before we get into the web assembly observability it's important to understand the basics of what observability is so observability is just getting more information about the application there are like layers into it which are like metrics logs and traces so metrics meaning any data that can be aggregated and can be counted as a metric with more and more systems application this becomes a very important metric like very important piece as it tells you how the application is pramming over time and also how the system is performing people who are familiar with the cloud native and kubernetes ecosystem you might have heard of a tool called Prometheus uh so simple example would be Prometheus scraping the metric from different targets at regular intervals then comes the tracing this is important when we talk about the microservices architecture as it gives the insight into the application running inside any platform whether it's like a kubernetes or something then capturing the traces of the request and determining what is happening throughout the request makes it easier to find the issues easier to find the latencies which particular trace of the application is actually causing the problem when a problem actually occurs again talking about the cloud native folks you might be familiar with the tool called Jagger so Jagger is a popular tool in this particular space coming to the final piece which is the logs and I I think most of us who have written applications you have used logs all of us have used the log analysis for debugging at some point whether we when we have written the application to get to the root cause of the problem and when we talk about complex system microservices any type of application there are a lot of components each components emiting different logs the structured logging becomes important and the tools again you can compare the logging tools such as elastic low key and some of the other tooling so these are the three key things when we discuss about observability so you have metrix logs and traces now these metrix logs and traces are stored into a database like a Time series database or whatever database that is there and then there is a query layer so as a user as me so what I want to do is I want to use that single query layer and get the meaningful insights from my application so that I can debug it faster you also might have heard about the complete cycle of observability which is called like observe Orient decide and act so as an SRE or whatever that you are in the team or as a devops engineer you are continuously observing the system I'll give you an example for example an Sr starts their day so usually when s starts their day they always go through you know some of the dashboard some of the tooling and check the alerts which are there try to find what is happening so that is the Orient the root cause analysis and then see discuss and decide how to fix them and then actually do the changes either it's a short-term fix if it's a onetime bug or if it's a long time occurring mg and try to the push the code changes to make the longer term fix for that overall observability gives you better understanding of the system and the application it helps you with better troubleshooting and also the dashboards for the performance and health of the application and systems and now when we talk about kubernetes obviously kubernetes is a complex system so it also gives the health of the system that's why I said dashboard for performance in health of applications and system here we are going to talk about obviously web assembly observability why it is difficult and how you can do but before that again let's try to understand observability with the help of another example so that our Concepts become clear from here so there is a user a user has written an application now that particular application is deployed onto a system that system can be any system a virtual machine commun is cluster and it has a URL now a lot of users are accessing that URL so that URL is your application that is the user facing application that is the application that you have given to your users for your product and users are accessing your application there are hundreds of thousands of users who are accessing your application now there can be days when things fail uh and you need to find out what failed when it failed what is the slowness all about which part is slow which part of your application page is slow how many 500R how many 400 is there any Ros attack so there has to be observability system in place to get answers for all these questions now let's come to challenges in web assembly observability now whenever the application is deployed what happens usually you will have the application you'll have an agent that will be capturing all the metrics from the application agent is deployed of the host if in Cub ecosystem it can be deployed as a demon set it also can be deployed as a side car so that it captures and then it gives to a centralized agent and then that forwards all the metric in chunks to a big system like you know neur Relic data dog open Telemetry and stuff like that but in web assembly modules do not know about the host that is one of the biggest challenges like web assembly modules do not know about the host so they don't know where to interact and where to send the metric so the thing is you actually can open some of the connections but you don't want to keep the connections open for a longer period of time because as metrics you need time stamps now whenever the metrics are sent you need the exact time time so the connections have to be open throughout so you need access to system clock and that to continuously web moding should be able to make IPC calls as in bet required web assembly also do not have access to the system you already know now by now you know what web assembly is like it is you know independent and independent of the OS it doesn't have any knowledge about the operating system and host system so that is the reason the observability thing in the web assembly ecosystem becomes difficult now what we'll do is we'll discuss two areas and show how we can achieve some sort of observability the first one will be vasi loging so vasi logging is a simple loging API and it can be used as the uh standard error like the stdr destination and it has different input levels so you might have seen log and then level so there are different levels like Trace debug info V error critical then there is a context like whether it's a log whether it's a info and then there is a context context can be stram like whether it's stdr ER and then comes the message the actual message so that uh you know what exactly the message is when that particular log occurs so what we try what we'll do is we'll try to see it with the example for the demo purpose what we'll use is I have cloned the repository of vasm edge the basom M itself and then there is this examples plug-in and loging so I am right now inside the vasi loging directory so after the get clone and going inside the vasi loging directory what we can see is cat SRC main. RS it just has the use vag loging example and wasi log demo so what we'll do is we'll see the lib and inside that uh we can see different log levels so that's what I was telling about first we have the level so we have info then we can have a string and then that's again a string so info context and message three things are there and these are the six level Trace debug info one error critical and then the context and then the trace level message whatever the level of message it is and then uh some of the function calls over here and here we are passing the context so you can see we are demo template passing stdr so it goes here stdr what becomes in stdr so we we'll get to see all these things so in order to run this demo a few things first you should be having rust installed you should be having VM Edge installed uh you should be having a plug-in installed as well so you should be having vum Edge plug-in wasi loging for the particular environment that you're running where you can download this or you can directly build it when you have the Clone the repository or you can directly go to the releases page and download from a particular release the vasi loging plugin and put that in the plug-in directory so these things you have to do after this what you have to do is build so we'll do cargo build Target vam 32 Wazi once finished we will try to prun it and we can see we have directly run the vum edge and for the first level we can see the info level logs we can can see three kinds of messages we can see the trace we can see debug we can see different colors for that we can see critical and then we can see different context changing so demo one we can see STD out messages so this can be direct STD out messages level two demo two is the STD out message without the context where the context was empty and the third one is the stdr E RR where the context is error so we can provide different level of context with different different levels of Trace debug info warning error critical that have different color coding as well so this is one way in web assembly using vasi logging that you can have logs moving next is something by DP so called observe SDK what happens here is you have the web assembly code you now instrument that code using something called observe API now that observe everything is open source so observe SDK and observe API both are open source projects and you can use observe API using manual instrumentation or Auto instrumentation and then you will be having the observe SDK adapter that will be sending data to open Telemetry data dog and there are different types of adapters so let's look at these adapters first like look at their documentation first and then we'll go through one of the examples as so this is the dilp to observe SDK GitHub repository you can see observe AP I is over here and then let's go through it again it provide the SDK for web assembly for continuous monitoring and it has the supported Telemetry to Honeycomb light step data dog and open Telemetry so it has different adapters in different languages we'll be using one in go and also in open Telemetry the example here is of open Telemetry we'll try to use a bit open Telemetry STD out and then instr umentation so one is automatic instrumentation so automatic instrumentation usage is like you have the code and then you put the API key an API key you can easily generate here so click here to automatically instrument and you should be able to get a generate key and using that key you should be able to automatically instrument the code there is a manual process as well where you have the uh metric log span enter span exit and span tags so this also is there right now which is there in Rust and uh C so let's try to understand how the instrumentation would look like so the instrumentation would look something like this where you have hash instrument and you have uh metric so you use the observe API so you have the instrument log metric span enter span exit span tags now here what we are trying to do is log something it is passed hello world one is passed here and then it is just metrix and the metrix format is stats D and hello world and the log is level where you can provide warning and then you can provide this same string message over here that's what this particular thing does and you can also use span tags over here so what we'll use is we'll try to use one of the examples of count WBLS so this is the count vels if you see this is the code this the rust code of counting the Vel so you have the constant of vels you pass it and it reads the characters matches if anything is there it can contains and then it simply prints the count number of FS uh what we are going to do is we'll be using it auto instrumented web assembly module and then try to run it but the key part here would be the adapter uh now this is the auto instrumentation Auto instrumentation is something which is there now we'll be using the adapter the adapter what we'll be using is the open Telemetry adap so let's try to look at that we'll be using killer Koda Ubuntu play ground now one thing we have to do over here is change this to like it has Go version as 118 so we'll change this to 120 so let's do that first so I've just fast forwarded all these steps required to have the go 1.20 and we can see go 1.20 is there now what we'll do is we'll also install V so V is uh one of the web assembly run times so we'll have wero installed over here we'll also get the in auto instrumented code because we need that so let's get the auto instrumented code and what we are going to do is we'll do go mod in it demo we'll create a main.go file and in the main.go file now this is the adapter code so I have tried here to keep things simple you can also check the open tetri example where you can specify the open Telemetry and the agent and you can use any local zkin or whatever agent is there to get the metric out of that but here it is just the STD out so instead of open Telemetry we are using the otel STD out which is there and here it is the adapter so this the new oal adapter this is the start command for that this just simple error this the V zero run time so so we need that and after that it is the observe SDK adapter applied to the vazo runtime then the vazo configuration and then instantiating the vasm module so this is the instantiation of the web assembly module which is there and then it adds some additional metadata and it should give us some open Telemetry output so that's what it is let's try to run it we still have some dependencies that we need to go get so let's go get all these and now we are running it and we should be able to see some open Telemetry STD out data from the auto instrumented code using observe API and observe the main.go here we have used the open observe adapter for oel STD out and you can see we have all the STD out over here the data and this is something which is not very much readable but if you see there there are like resource spans and you can see all the trace IDs and you can see values the function calls the span IDs are over here and if you pass it as open Telemetry or if you pass it to particular agent then you should be able to see a fancy in a fancy way much more organized way and then you can uh visualize according to yourself so yes observability in web assembly is hard and also uh the open observe like the dbo team is working towards getting it accepted as V observe definition uh it is hard but companies like TPO are working towards making it efficient so which is cool and you have vasi logging so you still have a few options and I wanted to cover that in this particular course so that you know that what all is there when we talk about observability in web assembly and how you can actually instrument your code automatically or manual or using vasi loog so that's it for vasm observability hello and now we come to the end of this course throughout the course we used uh various demos and examples which are available the wasm course repository we have placed a link to in the description of this video and hopefully this course has given you enough webly knowledge to start building cool stuff with we one of the other things that we have tried to do with this course is instead of going through every nity and writing every line of code in the course ourselves for everything if you have tried to give you enough knowledge to start building stuff with web assembly and also start exploring stuff with web assembly yourself so let's say tomorrow there's some new feature in web assembly you'd be able to explore it by yourself without having to go through any course let's say you want to where the new feature in web assembly yourself tomorrow you'll be able to do that without having someone guide you line by line and that was one of the main uh motives of this video series to have you be equipped to build cool stuff as well as be all ready to explore stuffff at web assembly ourselves so let's take a quick look at what we learned in this course so we started off with a history of web assembly why web assembly came into play and uh why was it even a problem that was worth solving uh within the color C how webs works and at that time I bet a lot of you might be thinking how webs might be different from java virtual machine and those kinds of deployment formats so we also talked about that with then talked about we he was originally built for JavaScript so we also talked about how it worked with JavaScript and and now how it's working outside the browser as well we then talked about different wasm features uh we talked about the very wor and very interesting CNC of VM landscape which is multiple tools and tooling that have been developed on VM which is actually pretty cool because for a lot of time there was a big problem about enough tooling around wasm there wasn't enough developer to in the art was so that was nice to see we then took a look at some of the specifics of was we took a look at how memories being managed in Wasing how linear memory helps solve some of the problems imper also not without any challenges so we took a look at this challenges with think out about was and how was Secure by Nature how some of the promises of was come into play we then talked about what exactly is a web assembly module and how do you if you wanted to uh how could you handr a web assembly module we also talked about that we then talked about some of the tool chains around was and how you can compile languages to assembly modules how you could run those Rob modules in other languages so we talked about these kind of tool chains we also talked about how run times run these web assembly modules and exactly what goes on into running these we then talked about one of the focuses of this course about mod mon the browser we mainly talked about this uh to set up for how web assembly is not only limited to the browser even though it was built for the browser so we talked about wasi web assembly system interface we talked about component model and we also talked about different modifications to wasi that have come in recently we talked about wasi X we talked about wasi Preview 2 we talked about how you can start using them and then we also talked a bit about what different kinds of use cases could you use wasam on the server for we then talked a bit about uh networking and web assembly we talked about the wasi networking proposal which is really important to make web assembly well-rounded and suitable for all kinds of server applications very related to that we also talked a bit about spin which is a popular framework to do this kind of stuff we then talked about the component model in detail what actually is a comp and how do you build with the component model to allow for building applications with web assembly within talked about how you can use uh web assembly in kuties clusters and uh have kuties do all the orchestration for you which is pretty popular and there are quite a few Cloud providers popular ones including AAR which already support right out of the box doing this kind of stuff but we showed you exactly how this kind of stuff works under the heart we then talked about how you can create an end to end full application with web assembly wasi running it on the server side having some form of TV store and doing some form of networking as well we then talked about and showed you a few interesting DeVos how you could average machine learning inferencing with was we particularly take a look at how wasum can put different kinds of backs and popular Frameworks from other languages we specifically took a look at five do examples and how bom cats up with those kind of different packets we then took a look at observability and how you can get some observability for your wasm modules and that was all that we covered in this course and that was quite a bit of it but most certainly this course is not exhaustive so I'd urge you to take a look at any of the videos again if you need to that is quite a bit of content now let's talk a bit about some of the future prospects in web yeah um so that was a nice Roundup of what we cover in this particular course so as uh Rashid mentioned this course uh enables you to start building stuff so you you now should have all the knowledge with all the concepts with all the terminology and quite a handful of demos as well that you can go check out do on your own different systems and then build on top of it uh and if you happen to build some cool stuff uh you know do tag us on the social so that we can celebrate together what you learned and what the wins are coming to 20 For What in the bag for web assembly in my opinion one uh definitely like I am a cloud native and kuber fan so I always start from that angle first so that would be the razi integration and the razi uh integration getting more matured and we soon start seeing multiple Cloud providers to provide the native web assembly noes as an option uh for the communities offering so what that means is uh you create a cuetes cluster so you will be able to easily create a different node pool uh which has web assembly preconfigured and you can just have a node selector or node name or whatever criteria that you want to Target that particular web assembly workload to the web assembly configured node so that it enables the same developer experience that you have learned for like quite a few years and you can use the same devx to create and run your web assembly workloads coming to the component model which everyone was excited in 2023 uh we have seen a lot of implementations we have seen in spin 2.o how component model has unmatured and we keep on seeing it getting matured and getting more widely adopted simply means you'll be able to to use the library that you love in one language to be imported and used in another language reducing the duplicacy improving the efficiency and the reusability of components then V the preview to we also will see the uh increment networking support more number of system calls in that so I think that will also uh get matured and then all the API being implemented with Within These specifics specific run types you'll also see more proposals I think in the web assembly observability space and also more implementation so we'll see more and more Innovation around the observability and the debugging space because that is interesting that is a bit tough when it when we talk about web assembly because as explained in the course as well it is you know web assembly because of its isolated and secure sandboxing doesn't know about the host can't do you know uh the CIS calls natively and its capability based model makes it limited in terms of how it can observe how we can observe the web assembly model we can debug that uh there are still tooling which we have already shown and then I think there will be more interesting tooling being developed or which short in 2024 coming to AI uh if we have seen in the in the second half of the Year mainly uh AI in inferencing matured in the web assembly space so we have seen more and more of AI inferencing being done uh as web assembly so we'll see even more growth in that growth meaning more models will be supported by the run times specifications getting more stronger for supporting various AI use cases so that will happen one of the features garbage collector will continue to get improved as well so I think those are some of the key areas that will see more enhancements in 2024 on on the adoptability side of things I think this year can prove to be one of the years where web assembly adoption becomes like very very common why we see this so we have seen different conferences like vmon vum IO Cloud native wasum days so we have seen all these and if you see if you see the pattern if you see the the type of talks uh that are being delivered people are actually bringing more and more use case based talk which shows people are are actually using implementing and getting things to production using web simply on the server side of things so I think that makes it the the whole different story and that shows practically that the adoption is skyrocketing and this 2024 will be very special for web assembly when it comes to adoption because this year we'll see more and more number of practical uh use cases and uh we'll see the acceleration in The Proposal enhancements as well I also talked about uh v x which is you know V plus add-on capability so if there are companies like vmer who are actually building stuff which is being asked by the customers things I just wanted to uh point this because of the adoptability like people are using they are getting like this is the issue and then there are certain companies and organization who are building those extensions and you know building various things around it or as an add-on capabilities to cater those set of use cases and I see different R times doing it so yeah 2024 will again be very interesting to see how web assembly grows and definitely it'll grow that's for sure and that is why uh we also thought that 2024 will be the best time to get you started in the first month itself get your gear set and learn about web assembly and now uh you get on by creating some cool stuff with web so yeah that's pretty much it from our side and uh we hope that that you enjoy the course uh so if you have learned something for from the course uh it's free free to share so please share that uh in your network for anyone who wants to learn about web assembly uh on the server site Cloud native angle observability machine learning and different aspects that Rashid just mentioned do let us know if you face any difficulties do try out the examples Post in the comments what you are building or what you have learned uh from this particular course from the creators perspective I really enjoyed building this course with Rashid cross time zones uh it has been really fun uh building the complete course it was challenging to identify what all we want to cover what all we want to skip what all we don't want to cover and get the whole usable course that gives you something out there so yeah that's pretty much it and thank you so much for watching
Info
Channel: Kubesimplify
Views: 3,306
Rating: undefined out of 5
Keywords: wasm course, Webassembly course, wasm and Kubernetes, Learn WebAssembly
Id: eYekV2Do0YU
Channel Id: undefined
Length: 208min 34sec (12514 seconds)
Published: Mon Jan 15 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.