mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 14:33:47 +00:00
Merge pull request #1291 from lightpanda-io/docker-update
Docker update for zigdom
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -7,12 +7,12 @@ ARG ZIG_V8=v0.1.37
|
|||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
|
|
||||||
RUN apt-get update -yq && \
|
RUN apt-get update -yq && \
|
||||||
apt-get install -yq xz-utils \
|
apt-get install -yq xz-utils ca-certificates \
|
||||||
python3 ca-certificates git \
|
clang make curl git
|
||||||
pkg-config libglib2.0-dev \
|
|
||||||
gperf libexpat1-dev \
|
# Get Rust
|
||||||
cmake clang \
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y
|
||||||
curl git
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
|
|
||||||
# install minisig
|
# install minisig
|
||||||
RUN curl --fail -L -O https://github.com/jedisct1/minisign/releases/download/${MINISIG}/minisign-${MINISIG}-linux.tar.gz && \
|
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
|
mv libc_v8.a v8/libc_v8.a
|
||||||
|
|
||||||
# build release
|
# 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 debian:stable-slim
|
||||||
|
|
||||||
|
|||||||
5
Makefile
5
Makefile
@@ -114,14 +114,11 @@ end2end:
|
|||||||
|
|
||||||
# Install and build required dependencies commands
|
# Install and build required dependencies commands
|
||||||
# ------------
|
# ------------
|
||||||
.PHONY: install install-dev
|
.PHONY: install
|
||||||
|
|
||||||
## Install and build dependencies for release
|
## Install and build dependencies for release
|
||||||
install: install-submodule
|
install: install-submodule
|
||||||
|
|
||||||
## Install and build dependencies for dev
|
|
||||||
install-dev: install-submodule
|
|
||||||
|
|
||||||
data:
|
data:
|
||||||
cd src/data && go run public_suffix_list_gen.go > public_suffix_list.zig
|
cd src/data && go run public_suffix_list_gen.go > public_suffix_list.zig
|
||||||
|
|
||||||
|
|||||||
40
README.md
40
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.
|
install it with the right version in order to build the project.
|
||||||
|
|
||||||
Lightpanda also depends on
|
Lightpanda also depends on
|
||||||
[zig-js-runtime](https://github.com/lightpanda-io/zig-js-runtime/) (with v8) and
|
[zig-js-runtime](https://github.com/lightpanda-io/zig-js-runtime/) (with v8),
|
||||||
[Libcurl](https://curl.se/libcurl/).
|
[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:
|
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 \
|
sudo apt install xz-utils ca-certificates \
|
||||||
python3 ca-certificates git \
|
clang make curl git
|
||||||
pkg-config libglib2.0-dev \
|
|
||||||
gperf libexpat1-dev unzip rsync \
|
|
||||||
cmake clang
|
|
||||||
```
|
```
|
||||||
|
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
|
nix develop
|
||||||
```
|
```
|
||||||
|
|
||||||
For MacOS, you only need cmake:
|
For **MacOS**, you need cmake and [Rust](https://rust-lang.org/tools/install/).
|
||||||
|
|
||||||
```
|
```
|
||||||
brew install cmake
|
brew install cmake
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install and build dependencies
|
### Install Git submodules
|
||||||
|
|
||||||
#### 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.
|
The project uses git submodules for dependencies.
|
||||||
|
|
||||||
@@ -213,15 +202,14 @@ To init or update the submodules in the `vendor/` directory:
|
|||||||
make install-submodule
|
make install-submodule
|
||||||
```
|
```
|
||||||
|
|
||||||
**html5ever**
|
This is an alias for `git submodule init && git submodule update`.
|
||||||
|
|
||||||
[html5ver](https://github.com/servo/html5ever) is high-performance browser-grade HTML5 parser.
|
### Build and run
|
||||||
|
|
||||||
```
|
You an build the entire browser with `make build` or `make build-dev` for debug
|
||||||
zig build html5ever
|
env.
|
||||||
```
|
|
||||||
|
|
||||||
For a release build, use `zig build -Doptimize=ReleaseFast html5ever`.
|
But you can directly use the zig command: `zig build run`.
|
||||||
|
|
||||||
## Test
|
## Test
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user