From 6f6b879e8ddc689b5ffc245d641963557e3f3bca Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 2 Feb 2023 13:38:02 +0200 Subject: Add instructions for when building headless LO core for WASM Change-Id: Ic5fb943f8c26d21d94bafb815963960bdd2f26b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146497 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist --- static/README.wasm.md | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/static/README.wasm.md b/static/README.wasm.md index cbe5f74f6607..042417051de3 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -1,8 +1,19 @@ # Support for Emscripten Cross Build -This module provides support for emscripten cross build +This module provides support for building LibreOffice as WASM, with the Emscripten toolchain. -## Status +You can build LibreOffice core for WASM for two separate purposes: +Either to produce a WASM binary of LibreOffice as suchn, using Qt5 as +the GUI, or just compiling the LibreOffice code to WASM libraries +without any UI for use in other software that has the UI, like +Collabora Online. + +The first purpose was the original reason for the WASM port and this +document was originally written with that in mind. For the second +purpose, look towards the end of the document for the section +"Building headless LibreOffice as WASM for use in another product". + +## Status of LibreOffice as WASM with Qt The build generates a Writer-only LO build. You should be able to run either @@ -326,3 +337,27 @@ Emscripten supports standalone WASI binaries: - - +## Building headless LibreOffice as WASM for use in another product + +### Set up Emscripten + +Follow the instructions in the first part of this document. + +### No Qt needed. + +You don't need any dependencies other than those that building LO normally downloads and compiled when building core. + +### Set up LO + +For instance, this autogen.input works for me: + +`--disable-debug` +`--enable-sal-log` +`--disable-crashdump` +`--host=wasm32-local-emscripten` +`--disable-gui` +`--with-main-module=writer` + +### That's all + +After all, in this case you are building LO core headless for it to be used by other software. -- cgit