Build from sources
Prerequisites
Lightpanda is written with Zig 0.14.0. You will have to
install it with the right version in order to build the project.
Lightpanda also depends on
zig-js-runtime (with v8),
Netsurf libs and
Mimalloc .
To be able to build the v8 engine for zig-js-runtime, you have to install some libs:
For Debian/Ubuntu based Linux:
sudo apt install xz-utils \
python3 ca-certificates git \
pkg-config libglib2.0-dev \
gperf libexpat1-dev unzip rsync \
cmake clangFor MacOS, you need Xcode and the following pacakges from homebrew:
brew install cmake pkgconfInstall and build dependencies
All in one build
You can run make install to install deps all in one (or make install-dev if you need the development versions).
Be aware that the build task is very long and cpu consuming, as you will build from sources all dependencies, including the v8 Javascript engine.
Step by step build dependency
The project uses git submodules for dependencies.
To init or update the submodules in the vendor/ directory:
make install-submoduleNetsurf libs
Netsurf libs are used for HTML parsing and DOM tree generation.
make install-netsurfFor dev env, use make install-netsurf-dev.
Mimalloc
Mimalloc is used as a C memory allocator.
make install-mimallocFor dev env, use make install-mimalloc-dev.
Note: when Mimalloc is built in dev mode, you can dump memory stats with the
env var MIMALLOC_SHOW_STATS=1. See
https://microsoft.github.io/mimalloc/environment.html .
v8
Lightpanda browser depends on v8 Javascript engine.
This build task is very long and cpu consuming, as you will build v8 from sources.
make get-v8make build-v8For dev env, use make build-v8-dev.