Use Linux or LibreOffice natively in your browser: this is how you can take advantage of WebAssembly

When it comes to using applications and operating systems through the web, we usually find ourselves well with web applications that act as VNC (Virtual Network Computing), well with mere simulations created using technologies such as Flash or JavaScript, with very limited functionality. That is, they either run on a remote server, or they are not at all the software they purport to be.





But is it possible for complex software—like, say, a Linux distribution or an office suite—to run natively in our web browserb? Yes, thanks to a technology released in 2017: HTML5/WebAssembly.


WebAssembly is an open standard that allows us to execute binary code on the Web; that is, compiled and developed using languages ??such as C/C++, and offering a performance closer to that of the usual compiled code than that of the interpreted code. In WebAssembly, the software runs inside a ‘stack machine’ (a special kind of virtual machine).

LINUX and GNU: LINUX: WHAT IT IS AND HOW IT WORKS

Linux on WebVM

Windows users already have access to a Windows Subsystem for Linux (WSL), which allows you to run a Linux distribution as a Windows program. But what if we could run a Linux environment as if it were a website?

Vim

An instance of VIM running inside my browser thanks to WebVM.

That’s exactly what WebVM offers us: a Debian environment (with the basic tools and no desktop environment) running inside a virtual machine based on at CheerpX. This machine is capable of generating new WebAssembly modules on the fly from x86 code.

When WebVM is running, CheerpX starts a Bash process which allows us to interact with Linux and start other derived processes by typing the relevant commands. The user interface is based on the Xterm.js component, while the third major WebVM component is an Ext2 format disk image with a bunch of pre-installed packages, which are provided via a CDN.

The latter does not mean that it does not run on the client side: all users access the same disk image from the aforementioned CDN, and the individual changes we make are kept locally on the browser, which means that WebVM supports “millions of concurrent users with minimal costs and resources”.

20 Cool Completely Free Web Apps You Can Use on Any Operating System

Libreoffice ‘made in Allotropy’

But Linux is not the only software that can run on a WebAssembly virtual machine inside your browser: the German company Allotropia, which offers consulting services related to the open source LibreOffice office suite, It also puts at our disposal a web service that allows us to run said suite in our browser.

LibreOffice

When we open it, we must bear in mind that it will download around 300 MB of data directly to our browser, so it may take a while to load if we have a slow connection. But once downloaded, according to most users who have tried it, the performance of the tool is very close to that of a native Libre Office window.

The main problem it presents when using it as a substitute for Office 365 or Google Docs is that it is not capable of opening files on our hard drive, only having access to the content of its own virtual machine.