Life: WebAssembly on your smart fridge? This new VM written in Go makes it possible
Ever wanted to write WebAssembly programs for your smart devices? Expand past the browser. Life is a cross-platform WebAssembly virtual machine written in Go. Find out how to get started.
What is Life? No, we aren’t getting philosophical here, just looking at a new cross-platform WebAssembly virtual machine.
Developed by the Perlin network and written in Go, Life caters to decentralized applications.
WebAssembly (also known as Wasm) is a memory-safe, sandbox-executed “binary instruction format for a stack-based virtual machine.”
Let’s not waste any more time and dive in. After all, life is short.
The meaning of Life
On the announcement blog, Kenta Iwasaki writes, “Imagine writing blazing-fast WebAssembly programs running on your smart TVs/fridges, mobile phones, or even your gaming laptops. You could have smart devices all around the world securely training machine learning models, hosting up databases, or even hosting up blogs/online retail stores 24/7.”
WebAssembly has uses outside of just the browser and its security features and high-level language compatibility are unmatched.
SEE ALSO: Using Go for WebAssembly applications
With this image of the future in mind, we look at Life to guide us there. The cross-platform and modular WebAssembly VM runs on virtually any device.
Yes, you can link Life up to your Raspberry Pi. This opens up a lot of possibilities for developers. We look forward to seeing what people can create with this. (Let us know if your gears are turning!)
Iwasaki lists that life was developed to be fast, correct, secure, pure, and practical. We all know that WebAssembly is secure, and now we can be sure that Life takes advantage of that feature as well.
At the speed of Life
Life claims to be fast. (No, don’t go bringing out life expectancy numbers. I mean during stress-testing.)
For the sake of impartial judging, it is worth noting that neither Wagon nor Wasami claim to be high-speed, and speed is not the sole measure of greatness. (Take a look at the raw results yourself and then see which is best for you and your project.)
Get a Life
Interested in getting started? GitHub has all the instructions you’ll need to get started and install the VM.
You will need to initialize the WebAssembly virtual machine and then execute a function in the WebAssembly module. More detailed instructions on how to do so are also available here.
Security is not an issue. Life has already been tested out to run with complicated programs and according to Iwasaki they have, “even created a new backend to the open-source deep learning model compiler TVM which allows users to compile PyTorch, Tensorflow, Keras, MXNet, and Caffe models down to WebAssembly”.
This project is decentralized, which always gets a round of applause from us at JAXenter because of its accessibility! Kudos!
Perlin is also looking for code contributions, so if you have any commit messages to share, there’s no better time than now to let them know what you think.
Lastly, there is also a Discord server (with over 1,300 members at the time of writing this) for those of you who are interested in reaching out.