 Hi everyone, welcome to WeizenCon 20203. So today I'm going to talk about the topic unleashing the power of web assembly in system interface Vazhi in Go. So let me tell you about myself. I'm Rajiv Rajan Singh. I work as software engineer at Epimodal Musk. I graduated in August 2022 from JSSAT Bangalore, India. So it's been like more than one year of experience in software development in IT industry. So before starting the talk, I'm going to tell about the agenda for this talk. So I'll be covering web assembly. Then I will be going through web assembly system interface. And then I will be going through existing support for the web assembly in current Golan language. Then I will go through the new Vazhi P1 integration in Golan, which is added in Go version 1.21. Also, I'm going to show like a demonstration around Vazhi P1. And at last I will be covering the future of Vazham and Golan topics like what things are evolving and Vazham and Golan. The prerequisites for this talk is web assembly. It's not so required, but it's good to have a little bit knowledge about web assembly. Okay, so what is web assembly? So basically like web assembly is an instruction format only like designed for the web. So basically it is just a special type, like just take example like a special type of computer code that can run really fast in web browsers. So it is similar to other language browser understand like JS, but it is more like powerful and can do things like complex calculation or run games much smoother. So basically like in Golan, which is a popular language, started supporting Vazham a while back. So this means you can take a code written in Go and turn it into Vazham so it can run into your web browser. However, it still needs to some help from JavaScript to do things like access file or communicate within the internet. So as Vazham has grown, so have use cases outside of browser, but many cloud providers like Kubernetes, maybe cloud provider also like the other DevOps tools, related tools like Kubernetes and all Vazham has been involving in these technologies too. But Vazham, I mean Vazham isn't just for website anymore. Now I mean even complete like Google and Amazon are letting people run Vazham programs on their powerful computer. I mean it's like open for a new possibility of for running all sort of programs, not just websites within the speed of use of Vazham. Like then this is all about web assembly and so what's the web assembly system interface? So I will try to make it understand in very simple way. So Vazhi, web assembly system interface is like a special you can take as a special translator for Vazham programs. So it allows them to interact with the underlying system like the file system clock and random data on different devices just like native programs do. This is important because it makes the Vazham program more powerful and versatile. Basically like just think of think of Vazhi as a set of instructions for Vazham programs to say things like give me the contents of this file, tell me the current time, generate some random numbers. So basically the instruction what we are giving is like a request and device or platform that runs on Vazham program. So basically the goal line has Vazham support in like JS for a good JS. Now they have added a basically Vazhi snapshot preview one which is added in a goal line 1.21 and like thanks to the contributors who made this proposal and added this feature in the goal 1.21. So basically Vazhi P1 is a set of instructions for Vazham programs to use. Future versions are being developed and they might require changes on how Vazham programs are written or compiled. The cool thing about Vazhi is that it is standardized. So this means that Vazham programs written using Vazhi can run on different Vazham runtimes. We have a lot of Vazham runtimes like Vazham Time, Vazero, Vazham Edge or even platform like Node.js. Basically it's like having a common language that everyone understands. I mean I said you earlier like even cloud profiles are getting into on the action they are offering Bay to run Vazham Vazhi programs on their platform which opens up new possibilities for deploying and running Vazham programs in the cloud. So these are the Vazham runtimes. So let's talk more about the Vazhi support in Go Go Toolchain. So I said you write Go 1.21 adds a new port targeting the Vazhi P view Cisco API through a new Goose value Vazhi P. So basically like however it still allows some task like GoRoutines to happen together. For example like when one GoRoutines is doing something another can also be active thanks to feature called non-blocking input output but when a program is held from computer is running on like asking for a random data all GoRoutines have to wait until the I mean basically until the task is finished. So these types of work can be done using Vazhi P1. So also like it brings a new compiler instruction called Vazham port. You can also go through the new Vazham 32 port proposal which is a new I think in future it will be a new addition for that. And I said you about the Vazhi and how new Go Vazhi P1 in earlier slides. But I mean let's talk about more about the limitations of Vazhi P1. I mean obviously there is a limitation for this. So one thing that is missing in the Vazham interface version 1 I mean the previous Snapse P1 is ability to create new network connection directly. I mean this means we cannot easily make things like webbed servers using the standard tools from the go priming language. However some tools like Vazham and Vazham has add extra feature to Vazhi P1 including the ability to create network connections. So including I mean although I mean although these extra features aren't directly supported by Go language but there is a third party too. We have third party things which make it happen like we have a project by a steel rocket company at Net which utilize Go Vazham port. I mean basically that bridge this gap with this library we can use function like Net Dial and Net Listen to create network connection making it possible like web browsers and other network related programs when using Vazham. So that's about the Vazhi support current support for in the go tool set. I mean even go through the blog official blog they have released in the release notes I think so in in Golang 1.21 release notes. So how to how to use it like so it's very simple. So we need a one Vazham runtime to run it. So I am using Vazham time as of now. So you can use anything Vazham is or any any stuff. So also you need a one Golang 1.21. These are the prerequisites to run this Vazhi P1. You just write a main.go file hello all and then you use a command I mean you have to I mean give the Goose and go arc like this for Vazhi P1 Vazham and just build a main go file. So a binary I will be created Vazham and you can just run like run that binary using Vazham time. So if I show the code I have a main.go file and so I will definitely delete the older binary. So I am going to run things so let me see. So I have to goose have to so I have given my go arc and all the stuff and if I run it it will create a binary Vazham binary. So here main.vazham is created a binary. So I want to run this binary using Vazham time. So as I meant that Vazham so it's going to print a hello Vazhi 1. So yeah I mean this is working fine. So it's very simple you just write your program you need a one Vazham runtime and just run it. So this is a demonstration of Vazhi P1. So I mean so let me go through so we have talked about the Vazhi I mean things and all I mean I have assembly Vazhi and then there is a Vazhi support for I mean go 1.21. I mean let me so let me go through the future of Vazham and go. So there is an ongoing development for Vazhi preview 2. So in Vazhi preview 2 is already added but in goal line we don't have a preview 2. I mean personally I feel like there is not stable as of now it's not stable so maybe that is the reason we don't have Vazhi preview 2 as of now but there is ongoing development for that in goal line in goal line integrations. I'm not sure like what port they are going to add it like in the new port or is the existing port how backward compatibility will happen and all the stuff but let me let's talk about the other future Vazham and go stuff. So so future support for Vazhi modules in Docker and Kubernetes. So that's open a door for serverless and edge deployments. I mean this means like application can run highly distributed environment without needing a full operating system making them lightweight, efficient, scalable for the resource and I mean those constrained edge devices. And I thought I said you like the development for Vazhi 2 brings it will bring stability and wide adoption maybe that those network and network issues and all will be fixed. Even in Tinego we have a Vazhi P1 I mean it has a network support but since Tinego is not for a big I mean there is a difference between Tinego and big go for a larger application Tinego is not suitable mostly they are for edge devices. I mean I talked about the go Vazham export I mean that the neighbor seamless integrations of Go function with Vazham and it will expand the capabilities I mean Go developers can leverage the power of family of Go while taking advantage for Vazham portability and security also. So we have both advantages for if you have enabled Go Vazham export. I talked to you about Vazham 32 port also like which will expand target platform enabling Vazham on more architectures. So I mean I mean including maybe it might include like ARAM, WebAssembly 32 I mean basically at the end of the day like this opens up new possibility for deploying Vazham application on range of devices and environment. So these are the things which I know personally like what is happening in Vazham and Go but I mean there is a lot of stuff going on in this technology like Vazham and Go and Vazhi WebAssembly system interface. So yeah so thank you to listening me. I hope you enjoyed the talk. I try my best to give insights about the Vazhi and Golang and Vazham. So you can find about me on these links. Thank you so much.