Development/Emscripten

From The Document Foundation Wiki
Jump to: navigation, search

Introduction

This page describes the ongoing work to port LibreOffice to Emscripten. The goal is to cross-compile LibreOffice to run in the Browser through Javascript, maybe with some native UI using LibreOfficeKit. Currently this is in a proof-of-concept state.

Current state

Currently, as of 2015-10-13, configure setup runs and the build starts. However, there are still a lot of places that need to be adopted.

The build of some libraries can be skipped by setting them to external. At some point, they need to be patched to work with Emscripten.

Currently the following modules fail and need patching:

  • NSS
  • Boost

If you want to help out, poke samuel_m on IRC (#libreoffice-dev). You also can check out the Emscripten commits to see what has been done up to now.

Setup Emscripten

Install Emscripten as described here

Build

For the porting it is helpful to enable the Emscripten debug output:

export EMCC_DEBUG=1


Then start the Emscripten build:

./autogen.sh --with-distro=LibreOfficeEmscripten
make

Success stories

Some stories where huge projects were successfully cross-compiled using Emscripten:

Emscripten Bugs

There are some things in Emscripten itself that need fixing: