-
-
Notifications
You must be signed in to change notification settings - Fork 64
Build
Welcome to the Zenroom documentation wiki!
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:
-
make shared
its the simpliest, builds a shared executable linked to a system-wide libc, libm and libpthread (mostly for debugging) -
make static
builds a fully static executable linked to musl-libc (to be operated on embedded platforms) -
make js
ormake wasm
builds different flavors of Javascript modules to be operated from a browser or NodeJS (for client side operations) -
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) -
make web
creates in theextras
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
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:
-
make shared
its the simpliest, builds a shared executable linked to a system-wide libc, libm and libpthread (mostly for debugging) -
make static
builds a fully static executable linked to musl-libc (to be operated on embedded platforms) -
make js
ormake wasm
builds different flavors of Javascript modules to be operated from a browser or NodeJS (for client side operations) -
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) -
make web
creates in theextras
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
Zenroom is Copyright (C) 2017-2019 by the Dyne.org foundation.
The wiki documentation includes content taken from different Lua extensions, see AUTHORS for details.