Why LibreOffice in WebAssembly is a Big Deal
Earlier this week, demos began to circulate of LibreOffice (using the QT graphical toolkit) compiled to WebAssembly and running in the browser. This comes after Thorsten Behrens of Allotropia gave an interview announcing WebAssembly support in LibreOffice . The stories trended to the top of Hacker News. And this came hot on the heels of the Fosdem session explaining WebAssembly for LibreOffice. Why all the fuss?
The Underwhelming Promise
For whatever reason, WebAssembly has been undeniably slow to catch on in the browser. Two years ago, when we started investigating its potential, the most frequent usage we observed in the wild was, tragically, bitcoin miners running in the browsers of unsuspecting site visitors.
Now the tide seems to be turning. And LibreOffice is a sign that WebAssembly’s moment is arriving.
QT and LibreOffice
QT is a mature and stalwart user interface toolkit behind many Linux desktop projects. LibreOffice uses the QT toolkit for its graphical user interface.
QT has had WebAssembly support for quite some time. I first noticed it when I discovered an online version of an image slicing utility called PosteRazor. And the QT APIs have been improving over time. A handful of small WebAssembly tools have been built using QT. But LibreOffice represents a different trend.
LibreOffice is an established, well-storied codebase with millions of lines of code.
It’s not a toy, not a “Hello World” program, not a high-performance micro-library, not a utility… it’s a full-fledged suite of tools. And because of this, LibreOffice in WebAssembly represents a major victory for a technology that has been considered fringe. LibreOffice is “brownfield” code that just leap-frogged from the past into the future.
Is This the Resurgence of LibreOffice?
The folks at Allotropia very likely have a plan. What it is, though, we can only speculate based on the previously mentioned interview in which they referred to the project as LOWA (LibreOffice in WebAssembly). Thorsten Behrens concludes his interview with a hint:
There’s just a ton of work still to do, to make the LOWA LibreOffice really usable, so that will keep us pretty busy this year.
One does not put a year of work into demo-ware. So we at Fermyon suspect that today’s preview may in fact be the first step toward something new. As users of Google Docs and o365, we would certainly welcome an office solution that provided nearly 100% parity between the online version and the desktop version. We may be a year from seeing this come to fruition, but the potential here is undeniable.
But the victory extends beyond the story of an office platform. WebAssembly can be used for large applications! It has now been demonstrated. WebAssembly can be a vehicle for bringing mature code bases to the cloud without massive rewrites. Again, now demonstrated! LOWA is an example of a deep investment in WebAssembly. (If you have been paying close attention to WebAssembly, you’ll know that MS Excel in o365 has compiled some legacy C code to WebAssembly in order to avoid a costly rewrite but on a much smaller scale. One could speculate on whether the o365 team may also be looking at this path forward.)
Fermyon’s immediate interest in WebAssembly is cloud-oriented. But that doesn’t mean that we think the LibreOffice news is in any way irrelevant to us. WebAssembly is an ecosystem. We are just as eager to see venerable office suites, useful C libraries, and new programming languages come along.
Concluding Unscientific Postscript
We certainly think so. And LibreOffice brings WebAssembly one step closer to its shining moment.