News for hackers. Stuff that matters.

thorstenb

Re:ZetaOffice: LibreOffice in the Browser on Wednesday November 27, 2024 @03:12PM (#42259297)
Most devs here use FF as their daily driver - that said, if you need to debug an emscripten-compiled c++ WASM application in the browser, then it's either printf-debugging, or Chrome + the C/C++ DevTools extension. Additionally, the overall QoI for running WASM binaries appears quite a bit better for Chrome. Both issues tip the scales currently, in favour of Chrome (sadly).
Re:ZetaOffice: LibreOffice in the Browser on Wednesday November 27, 2024 @11:22AM (#42257232)
> It’s going to be extremely hard to get even decent results without targeting real DOM instead of going pure-canvas, and you can’t get excellent results without doing so.

One of the ZetaOffice (and LibreOffice) hackers here - and I have to disagree.

For something like an office suite, the canvas is literally the only way to achieve the document layout fidelity that users expect. The DOM does not provide enough knobs & dials to get all of MSO (and OOo) bug-for-bug layout compatibility onto the screen (and it's not even close). Don't take my word for it, see e.g. here: https://news.ycombinator.com/item?id=42100660 (and that only deals with the text layout parts).

Re:ZetaOffice: LibreOffice in the Browser on Wednesday November 27, 2024 @03:51AM (#42254240)
ZetaOffice is focusing on developers wanting to integrate it (be that a web app, or a desktop line-of-business application, e.g. via Eclipse RCP) - having the exact same code built across all platforms should make for excellent consistency (document rendering, and API compatibility). We can also offer LTS support & security updates, beyond the normal LibreOffice 1-year lifetime.
Re:ZetaOffice: LibreOffice in the Browser on Wednesday November 27, 2024 @03:44AM (#42254206)
Firefox is indeed a bit of a hit-and-miss these days (though we absolutely want to support it). Best experience currently is on Chrome(ium).
Re:ZetaOffice: LibreOffice in the Browser on Tuesday November 26, 2024 @07:41PM (#42251728)
Indeed can be done, proof of concept shown in this talk: https://www.youtube.com/watch?v=X8LwaDjcr7M

Regarding sandboxing - everything WebAssembly is heavily sandboxed already, and requires cross-origin isolation in the browser, so we can use SharedArrayBuffers.

So that's likely no worse than running LibreOffice containerized on a server.

Re:ZetaOffice: LibreOffice in the Browser on Tuesday November 26, 2024 @07:25PM (#42251620)
That still seems to be there, even for gtk4: https://docs.gtk.org/gtk4/broadway.html

(but it says, between the lines, mostly stale I guess)

As an aside: one of the very first demos of LibreOffice in a browser (from the Collabora people) was using the broadway backend. But they've moved on, using their own tiled rendering server backend, plus custom, javascript gui on the client.

Re:ZetaOffice: LibreOffice in the Browser on Tuesday November 26, 2024 @07:14PM (#42251567)
Yup, and it's all fully upstreamed in LibreOffice, see our blog (https://blog.allotropia.de/category/libreoffice/), and the upstream wiki page: https://wiki.documentfoundation.org/Development/WASM

For an even more obvious demo of that, c.f. the hidden gem https://zetaoffice.net/demos/simple-examples/rainbow_writer.... ;)

Current source version powering the demos is https://git.libreoffice.org/core/+/0d9eb8245e1a1345ed9526ad8... - we should make that more prominent, indeed.

If you could file an issue please, at https://github.com/allotropia/zetajs/issues (with os version & hardware, if relevant)?
ZetaJS is a browser-based version (using LibreOffice WebAssembly) - that should work (tm) on all reasonably modern browsers, including iOS. But see compat matrix for details: https://webassembly.org/features/

Show HN: ZetaJS – client-side LibreOffice widget and automation in the browser

https://github.com/allotropia/zetajs

ZetaJS wraps ZetaOffice, a WASM version of LibreOffice - and makes accessing the entire gamut of the LibreOffice programmability interfaces from JavaScript convenient, idiomatic & extremely fast.If you always wanted an entire client-side office suite in the browser, that you could fully automate with JS & seamlessly embed in your web apps - and on top of that, be able to self-host it...

( Read More... | 4 comments | 4 points | on HN )
Re:LibreOffice running natively in the browser via WebAssembly on Wednesday February 16, 2022 @07:32AM (#30359185)
We already use cairo/freetype/skia to do essentially all the document rendering in software (not for the Qt prototype though), so that's not a big leap to get that blitted out.

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.

Re:LibreOffice running natively in the browser via WebAssembly 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 on Wednesday February 16, 2022 @05:14AM (#30358203)
Yep
Re:LibreOffice running natively in the browser via WebAssembly on Wednesday February 16, 2022 @05:13AM (#30358199)
With LibreOffice, the nice thing is you can chose. if you want all of the above - install the native version.
Re:LibreOffice running natively in the browser via WebAssembly on Wednesday February 16, 2022 @05:12AM (#30358182)
Longer-term, we need to move to browser-native GUI, yep. The nice bits though - the entire document loading, rendering & editing works in the browser now.
Re:LibreOffice running natively in the browser via WebAssembly on Wednesday February 16, 2022 @05:04AM (#30358133)
Caching is a prob, due to the current size - what works here is:

* 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 .. ;))