LibreOffice running natively in the browser via WebAssembly
lab.allotropia.de
lab.allotropia.de
Here's the related video from FOSDEM: https://fosdem.org/2022/schedule/event/lotech_lowa/
Some lazy loading could probably be done relatively easily where OO does on-demand load libraries, but that would significantly resource apparent in-use performance if truly done live so you'd want to background load the optional parts once the immediately needed ones are done.
I'm guessing that this is a straight compile to WASM with the minimal changes needed to things that would otherwise break completely in the different environment.
Video: https://www.infoq.com/presentations/autocad-webassembly/
And it doesn't cache the download either, so refreshing the page forces you to download the entire thing again.
Runs shockingly smoothly once it starts, though.
On what hardware? I've got a 2019 MacBook Pro with i9 and 32 GB of RAM, and there's a noticable delay (I'd guess 200~400-ish miliseconds) when clicking any elements with Firefox or Chrome.
Probably just apple not supporting anything web related as usual.
The comment you’re replying to specifically mentioned Firefox and Chrome, no mention of Safari.
You should see jslinux:
Impressive feat, but I'm worried this small detail ruins the first impression for way too many.
Once they get their server bill perhaps they will reconsider optimizing it!
Now we can run the whole thing in a browser like it's Minesweeper. Wow.
I don't know what you're trying to say with this. I'm currently asking myself if it is really slow to compile/load, of if uBlock Origin broke something. I'm patiently waiting.
Update: It's kind of amazing to see what can run inside a browser.
Mind blown.
Now I only use Figma - and never open Photoshop (for UI design). I rarely open MS Office, use google docs without thinking.
Is this just a consequence of using Go for WASM(i.e. lack of WASM threads), What are people who built LibreOffice in WASM or Doom3 using? Can Go-level concurrency be achieved with WASM threads when programmed with other languages?
There are others who have complained the same on SO.
Another thing you can try is TinyGo, whch uses Asyncify (a general wasm transformation to allow blocking) for goroutines,
https://twitter.com/TinyGolang/status/1461364896197578759
Doom3 uses Asyncify in some parts of the event loop, for similar reasons (blocking code). I'm not sure if LibreOffice does as well, but it might.
The Go library I need(ebiten) isn't compatible with TinyGo, I did try it for the reason you mentioned and to reduce size.
> Doom3 uses Asyncify in some parts of the event loop, for similar reasons (blocking code). I'm not sure if LibreOffice does as well, but it might.
Thanks! That's what I wanted to know, So it's certainly possible to write asynchronous code using C++ and Rust.
It does have some overhead atm, which a new spec (stack switching) will remove eventually.
I had no idea WebAssembly was this far developed. This feels like electron in reverse, and GOOD.
It took a while to load, but the site is probably seeing heavy loads. But afterwards it feels like a native application.
The toolchains for webassembly are still not trivial to use.
I wish more work was done to support WASM, but it requires a lot of work from compiler developers, for each language backend, so it's still a lot of work.
Not to mention that I have almost no clue how to debug a WASM build.
WASM is clearly the future, but I don't think there is any company really spending money to write better WASM tools, and you can be sure WASM is against the interests of google, apple, microsoft etc.
I've got you covered: https://developer.chrome.com/blog/wasm-debugging-2020/ (TL;DR use Chrome DevTools with the official DWARF integration)
VCs laughed us out of every meeting.. "No-one will put their private documents on the Internet! You're mad!"
WHO'S MAD NOW, HUH? Huh? Huh...
It's ironic that you could've made more money than you would have gotten from VCs with that domain name. You probably didn't know that back then.
I'd have been a millionaire many times over if I could have read the future. All those Bitcoins I mined in early 2010 and lost all the keys/wallet.
Do you have screenshots or a video demo to share?
I miss the days when people had this much common sense.
They were essentially right, but unfortunately people have gotten used to having almost no private documents. Or rather, redefining privacy as "just me and the government and the large international corporations".
After the excruciating wait for it to load, it crashed. I would have been happier if it would have at least flashed a message "don't forget to drink your Ovaltine."
A quarter of a century later, this attempt works much better.
Java applets are in the same category as ActiveX controls, which is basically hosting native code (with all the security issues that entails) in a DOM element.
I think we are close. After COVID, we should be releasing a lot of the emotional attachment to the C programming tools. And by 2025, we should be able to have the Windows version of GIMP running inside Mac versions of Chrome, on top of Wine, X Windows, CC and WASM in Chrome. And since Chrome can be compiled to WASM, we could have GIMP running on Chrome and Chrome running inside Firefox.......
And the story ( or history ) continues in the link below.
https://www.destroyallsoftware.com/talks/the-birth-and-death...
I say almost, because we still have some QA code used for unit tests that is Java.
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.
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
Of note is that if you're on iOS, all browsers must use Safari as a rendering engine by Apple's decree, so any browser you try is actually just Safari with a skin (no Gecko/Blink). This means you can't run this on iOS, due to Apple's WASM size restrictions, regardless of the browser you try.
What are those? I searched for that and I got no relevant results
What is this? I paid for x GB of RAM and now Apple prevents me from using it?
Edit: abstracted away actual memory size.
You can't open local files or save to local files. Open/Save remote crashes...
Pretty impressive though.
Scrolling feels a little big laggy but entering text and moving things around all feels snappy.
What is likely to be seen as a bug by others, is actually the thing that gives me hope. There's no way for a WebAssembly program to access the host file system. I hope it stays that way.
If the Wasm host can, in a foolproof and easy to verify way, offer the user dialog boxes to read/write single files... we'd have the "PowerBox" that is required to make a modern capability based operating system.
Preventing a process from deciding itself which files to access disables so many attack vectors.
https://developer.mozilla.org/en-US/docs/Web/API/File_System...
It also disables a lot of existing use cases and file types (basically any multi-file file format):
Multi-part archives, multi-part video files, playlists, videos with separate subtitle files, HTML documents containing links to other local HTML documents or referencing various sub-resources (images/videos/audio/style sheets/scripts/...), Audacity projects, images with metadata in external sidecar files, ditto for georeferenced images, QGIS projects, AutoCAD's lock file implementation, DWG files as such, …
Edit: And since we're talking about Office software: Spreadsheets referencing data from other spreadsheets stored in separate files…
¹Not with full blown internationalization support for languages with very complex text rendering requirements etc., but most people don't need that.
To have a quick online version of office, they ran the eve/dll's in the cloud and send it back to the end user.
While it most definitely worked, it was definitely expensive as a first version. But it was too stop Google with their online office suite, as they didn't had an online response yet.
( Searched for the source, but can't find it. If anyone has it, please share. It's pretty old news by now).
https://www.microsoft.com/en-us/research/podcast/advancing-e...
Application exit (TypeError: Cannot convert "undefined" to int)
The page did finish loading and compiling in Chrome on my Mac. Menus, text input, etc. seemed to work but were sluggish, just as the standalone LibreOffice was for me on my ten-year-old MacBook Pro. (It works fine on my M1 Mac mini.)
- in the browser
Are there any non-native thing that runs in a browser?
VS Code also runs natively in the browser now: https://code.visualstudio.com/blogs/2021/10/20/vscode-dev This uses a Chrome only (for now) filesystem access API to give the browser access to your native files--you can edit them entirely in the browser with nothing happening on a server.
* FF: set browser.cache.disk.capacity to something >300MB, then set browser.cache.disk.max_entry_size to at least 150MB
* Chrom{e|ium}: start browser from cmdline, via `chromium --disk-cache-dir=/var/tmp/foo --disk-cache-size=2147483647`
(I'd not recommend this for production setups, obvsly .. ;))
Quite an impressive feat to compile a complex program like this into WASM, this could be very useful for things like automatically scanning documents with macros for suspicious behaviour inside companies that run LibreOffice because of the near-perfect sandbox WASM provides.
The 300MB download can seriously use a progress indicator, though.
This is so interesting. I tried on my phone, oneplus 8 pro, snapdragon 865 so a little bit above and on a scale that does 1-10 where 1 is "not even in dreams" and 10 is "more-or-less tolerable" I'd rate it a 2 or 3. There's an ostensible slowness when just selecting text for instance. If for you this is fast I don't think you have any idea of how fast an actually fast computer can be and that makes me super sad for you !
Seems really laggy for me on a 2015 Mac, to the point where I got a few unresponsive page warnings, but resizing at least works, so that's starting to get better. WASM continues to be very impressive/promising, and there's a lot of potential here. I just wish more of these frameworks would leverage the rest of the browser properly.
(the main developers left open office to fork it as libre office, after oracle aquired sun and open office with it, but destroyed it and after it was burned and pretty much without contributers, donated the name to the apache foundation, who for reasons unknown to me, do not want to merge again)
https://mobile.twitter.com/ApacheOO/status/13164228292026040...
Frustrating.
(but first search for pre-existing reports about them.)
Also consider donating to the project, and writing relevant people (e.g. Engineering Steering Council?), petitioning them to work on the quality of M1 support.
As someone who uses LibreOffice to the point that it has displaced MS Office (which is no longer installed on any of my private devices, only work ones), i have to agree that it's the better option of the two.
However, one could make the argument for OpenOffice that it's pretty much stable/finished/dead at this point which also means that it's unlikely to have unexpected breaking changes, or even changes to the UI or anything else: which would be horrible for software like OpenSSL that needs to deal with security related issues and patches, but might be more passable for an office suite, given that the OpenDocument formats aren't changing that much. Of course, since OpenOffice does get some updates, the most severe problems would probably get addressed anyways: https://cwiki.apache.org/confluence/display/OOOUSERS/Release...
Thus, it can be a viable package to just install and forget about, hence it's widespread in some universities that don't have awfully lot of resources to keep LibreOffice installs up to date (and if users learn it, then they'll probably be able to keep those skills relevant for the rest of its lifetime). Of course, one can also make an argument that you can just run an old version of LibreOffice, since the changes aren't that severe.
https://www.zdnet.com/article/browser-based-openoffice-org-r...
How is this possible?
Can you elaborate?
Incrementally then using more of html canvas to speed things up might be next.
Most of the work is going to be having the GUI (toolbar/notebook bar, menues, sidebar, dialogs) browser-native of course.
Application exit (RuntimeError: Aborted(Assertion failed: pTrans, at: /home/libo/src/core/vcl/qt5/QtClipboard.cxx,104,getContents))
Application exit (RuntimeError: Aborted(native code called abort()))
Does LibreOffice expect the OS or Desktop to provide a dict?
Question - if whole office suite can be loaded, I suppose Figma would already be doing WebAssembly?
Yes, they have been for a while.
This is their article from 2017 talking about it. I can't find any recent ones.
https://www.figma.com/blog/webassembly-cut-figmas-load-time-...
Sorry, but out of the loop here. What is the relationship between Figma and WebAssembly? Why would Figma already being doing it?
After I opened the file open dialog and then clicked cancel.
Firefox and the various WebKit browsers though, those should work. Theoretically they already work, as you can run them in JSLinux (the RISCV version or the Windows 2000 compatible versions), but that's a terribly slow method of running the software.
Safari (current) on MacOS (current) on a Apple M1
Cloud software is part of a rental model.
so now we have come full circle with a jvm (via wasm) in browsers again
On a more serious note, Flatpak and other sandboxing solutions make 100% more sense than using something that already leaks way too much in order to sandbox apps.