static/README.wasm.md | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-)
New commits: commit a9b8e9df244bc59111a922b21290331c9cafcb60 Author: Tor Lillqvist <[email protected]> AuthorDate: Thu Feb 2 13:38:02 2023 +0200 Commit: Tor Lillqvist <[email protected]> CommitDate: Thu Feb 23 18:30:11 2023 +0000 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 <[email protected]> Reviewed-by: Tor Lillqvist <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147527 diff --git a/static/README.wasm.md b/static/README.wasm.md index 7bca790acf7a..d345edd51baf 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 @@ -331,3 +342,27 @@ Emscripten supports standalone WASI binaries: - <https://emscripten.org/docs/introducing_emscripten/about_emscripten.html#about-emscripten-porting-code> - <https://emscripten.org/docs/compiling/Building-Projects.html> +## 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.
