Skip to content
Jaromil edited this page Mar 14, 2018 · 5 revisions

Welcome to the Zenroom documentation wiki!

Build instructions

This section is optional for those who want to build this software from source. The following build instructions contain generic information meant for an expert audience.

The Zenroom compiles the same sourcecode to run on Linux in the form of 2 different POSIX compatible ELF binary formats using GCC (linking shared libraries) or musl-libc (fully static) targeting both X86 and ARM architectures. It also compiles to a Windows 64-bit native and fully static executable. At last, it compiles to Javascript/Webassembly using the LLVM based emscripten SDK. To recapitulate some Makefile targets:

  1. make shared its the simpliest, builds a shared executable linked to a system-wide libc, libm and libpthread (mostly for debugging)
  2. make static builds a fully static executable linked to musl-libc (to be operated on embedded platforms)
  3. make js or make wasm builds different flavors of Javascript modules to be operated from a browser or NodeJS (for client side operations)
  4. make win builds a Windows 64bit executable with no DLL dependancy, containing the LUA interpreter and all crypto functions (for client side operations on windows desktops)
  5. make web creates in the extras folder a simple web page with a REPL and some boilerplate code to show how to use the WebAssembly binary

Remember that if after cloning this source code from git, one should do:

git submodule update --init --recursive

Then first build the shared executable environment:

make shared

To run tests:

make check-shared

To build the static environment:

make bootstrap
make static
make check-static

For the Javascript and WebAssembly modules the Zenroom provides various targets provided by emscripten which must be installed and loaded in the environment according to the emsdk's instructions :

make js
make wasm
make html
make web

NB. for the html and web target the generated files should be served by a http server and not directly opened in a browser eg.

$ make web
$ cd extras
$ python3 -m http.server

Build instructions

This section is optional for those who want to build this software from source. The following build instructions contain generic information meant for an expert audience.

The Zenroom compiles the same sourcecode to run on Linux in the form of 2 different POSIX compatible ELF binary formats using GCC (linking shared libraries) or musl-libc (fully static) targeting both X86 and ARM architectures. It also compiles to a Windows 64-bit native and fully static executable. At last, it compiles to Javascript/Webassembly using the LLVM based emscripten SDK. To recapitulate some Makefile targets:

  1. make shared its the simpliest, builds a shared executable linked to a system-wide libc, libm and libpthread (mostly for debugging)
  2. make static builds a fully static executable linked to musl-libc (to be operated on embedded platforms)
  3. make js or make wasm builds different flavors of Javascript modules to be operated from a browser or NodeJS (for client side operations)
  4. make win builds a Windows 64bit executable with no DLL dependancy, containing the LUA interpreter and all crypto functions (for client side operations on windows desktops)
  5. make web creates in the extras folder a simple web page with a REPL and some boilerplate code to show how to use the WebAssembly binary

Remember that if after cloning this source code from git, one should do:

git submodule update --init --recursive

Then first build the shared executable environment:

make shared

To run tests:

make check-shared

To build the static environment:

make bootstrap
make static
make check-static

For the Javascript and WebAssembly modules the Zenroom provides various targets provided by emscripten which must be installed and loaded in the environment according to the emsdk's instructions :

make js
make wasm
make html
make web

NB. for the html and web target the generated files should be served by a http server and not directly opened in a browser eg.

$ make web
$ cd extras
$ python3 -m http.server
Clone this wiki locally