From 8d992d74c075be90a4f4cf55e78a7fd654bcd785 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Wed, 24 Dec 2025 10:04:10 +0100 Subject: [PATCH 1/3] update Dockerfile for zigdom --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index ab61cf88..5d71dad7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,12 +7,12 @@ ARG ZIG_V8=v0.1.37 ARG TARGETPLATFORM RUN apt-get update -yq && \ - apt-get install -yq xz-utils \ - python3 ca-certificates git \ - pkg-config libglib2.0-dev \ - gperf libexpat1-dev \ - cmake clang \ - curl git + apt-get install -yq xz-utils ca-certificates \ + clang make curl git + +# Get Rust +RUN curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y +ENV PATH="/root/.cargo/bin:${PATH}" # install minisig RUN curl --fail -L -O https://github.com/jedisct1/minisign/releases/download/${MINISIG}/minisign-${MINISIG}-linux.tar.gz && \ @@ -49,7 +49,7 @@ RUN case $TARGETPLATFORM in \ mv libc_v8.a v8/libc_v8.a # build release -RUN zig build -Doptimize=ReleaseSafe -Dprebuilt_v8_path=v8/libc_v8.a -Dgit_commit=$$(git rev-parse --short HEAD) +RUN zig build -Doptimize=ReleaseFast -Dprebuilt_v8_path=v8/libc_v8.a -Dgit_commit=$(git rev-parse --short HEAD) FROM debian:stable-slim From 8105dff1679fc397d3b0d6ded4c800e3c95c551e Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Wed, 24 Dec 2025 10:04:30 +0100 Subject: [PATCH 2/3] remove useless step from README --- README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/README.md b/README.md index 79194354..abca45dc 100644 --- a/README.md +++ b/README.md @@ -213,16 +213,6 @@ To init or update the submodules in the `vendor/` directory: make install-submodule ``` -**html5ever** - -[html5ver](https://github.com/servo/html5ever) is high-performance browser-grade HTML5 parser. - -``` -zig build html5ever -``` - -For a release build, use `zig build -Doptimize=ReleaseFast html5ever`. - ## Test ### Unit Tests From ffe2bc9a02ca4cb23970c4edc2e6852446227e47 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Wed, 24 Dec 2025 10:27:39 +0100 Subject: [PATCH 3/3] update README --- Makefile | 5 +---- README.md | 38 ++++++++++++++++++-------------------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 8a25cb1b..d0230a78 100644 --- a/Makefile +++ b/Makefile @@ -114,14 +114,11 @@ end2end: # Install and build required dependencies commands # ------------ -.PHONY: install install-dev +.PHONY: install ## Install and build dependencies for release install: install-submodule -## Install and build dependencies for dev -install-dev: install-submodule - data: cd src/data && go run public_suffix_list_gen.go > public_suffix_list.zig diff --git a/README.md b/README.md index abca45dc..a854ad00 100644 --- a/README.md +++ b/README.md @@ -169,41 +169,30 @@ Lightpanda is written with [Zig](https://ziglang.org/) `0.15.2`. You have to install it with the right version in order to build the project. Lightpanda also depends on -[zig-js-runtime](https://github.com/lightpanda-io/zig-js-runtime/) (with v8) and -[Libcurl](https://curl.se/libcurl/). +[zig-js-runtime](https://github.com/lightpanda-io/zig-js-runtime/) (with v8), +[Libcurl](https://curl.se/libcurl/) and [html5ever](https://github.com/servo/html5ever). To be able to build the v8 engine for zig-js-runtime, you have to install some libs: -For Debian/Ubuntu based Linux: +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 clang +sudo apt install xz-utils ca-certificates \ + clang make curl git ``` +You also need to [install Rust](https://rust-lang.org/tools/install/). -For systems with [Nix](https://nixos.org/download/), you can use the devShell: +For systems with [**Nix**](https://nixos.org/download/), you can use the devShell: ``` nix develop ``` -For MacOS, you only need cmake: - +For **MacOS**, you need cmake and [Rust](https://rust-lang.org/tools/install/). ``` brew install cmake ``` -### Install 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 +### Install Git submodules The project uses git submodules for dependencies. @@ -213,6 +202,15 @@ To init or update the submodules in the `vendor/` directory: make install-submodule ``` +This is an alias for `git submodule init && git submodule update`. + +### Build and run + +You an build the entire browser with `make build` or `make build-dev` for debug +env. + +But you can directly use the zig command: `zig build run`. + ## Test ### Unit Tests