Re:LibreOffice running natively in the browser via WebAssembly
by yjftsjthsd-h on Wednesday February 16, 2022 @02:22AM
(#30357220)
Wait... Isn't LO a Java application? Have we created a new way to shove Java into a browser, but this time with the JVM itself inside the browser?
[ Parent
| on HN ]
Re:LibreOffice running natively in the browser via WebAssembly
by wahern on Wednesday February 16, 2022 @02:31AM
(#30357275)
It's mostly written in C++, and the bulk of the effort which made this possible should probably be credited to Qt: https://wiki.qt.io/Qt_for_WebAssembly
Re:LibreOffice running natively in the browser via WebAssembly
by thorstenb on Wednesday February 16, 2022 @05:17AM
(#30358228)
Qt clearly deserves the credit for having a WASM runtime that gets us a working GUI toolkit. But this was still a gigaton of work to pull off inside LibreOffice (starting many years ago, actually natively using Qt as one of the GUI toolkits in the code, over to porting the build system, how the mainloop runs etc etc).
Also note that using Qt here is mostly a shortcut to get a demo out, longer-term we'd want to use native browser gui.
Re:LibreOffice running natively in the browser via WebAssembly
by llornkcor on Wednesday February 16, 2022 @02:51PM
(#30364830)
> Qt clearly deserves the credit for having a WASM runtime that gets us a working GUI toolkit.
You're welcome. :) What version of Qt did you use for this demo? Also, for local system file access dialog on Qt wasm, you can use https://doc.qt.io/qt-6/qfiledialog.html#getOpenFileContent
Re:LibreOffice running natively in the browser via WebAssembly
by llornkcor on Wednesday February 16, 2022 @02:56PM
(#30364882)
Answered my own question by reading the README.wasm.md
"We're using Qt 5.15.2 with Emscripten 2.0.31. "
Re:LibreOffice running natively in the browser via WebAssembly
by jcelerier on Wednesday February 16, 2022 @08:03AM
(#30359445)
Side note: is there a way to get that Qt version of libreoffice somewhere on the desktop ? It's one of the only non-Qt apps I sometimes use :)
Re:LibreOffice running natively in the browser via WebAssembly
by tempay on Wednesday February 16, 2022 @02:27AM
(#30357252)
I think you're confusing it with OpenOffice. IIRC LibreOffice is mostly C/C++.
Re:LibreOffice running natively in the browser via WebAssembly
by grandinj on Wednesday February 16, 2022 @02:31AM
(#30357276)
LibreOffice is almost entirely C++, except that there are some extensions written in Java (and some written in python)
I say almost, because we still have some QA code used for unit tests that is Java.
Re:LibreOffice running natively in the browser via WebAssembly
by dtech on Wednesday February 16, 2022 @04:19AM
(#30357870)
LibreOffice is a fork of OpenOffice, which has been dead for nearly a decade. I doubt they rewrote all of the core functionality.
Re:LibreOffice running natively in the browser via WebAssembly
by jsight on Wednesday February 16, 2022 @11:16AM
(#30361889)
OpenOffice wasn't written in Java either. They did have a few small Java components (for example, HSQL) but it it was predominantly C++.
Re:LibreOffice running natively in the browser via WebAssembly
by bzzzt on Wednesday February 16, 2022 @04:40AM
(#30357986)
You don't need a JVM to run Java code in the browser since there's a VM already.
There's TeaVM which compiles Java bytecode to WASM.
Re:LibreOffice running natively in the browser via WebAssembly
by pulse7 on Wednesday February 16, 2022 @12:25PM
(#30362761)
It's true, but it is a Java subset - not a complete Java SE.