Skip to content

Commit 7fb9270

Browse files
committed
replace zig-js-runtime
1 parent fab6ec9 commit 7fb9270

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+5770
-3480
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ zig-out
44
/vendor/netsurf/out
55
/vendor/libiconv/
66
lightpanda.id
7+
v8/

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[submodule "vendor/zig-js-runtime"]
2-
path = vendor/zig-js-runtime
3-
url = https://github.com/lightpanda-io/zig-js-runtime.git/
4-
branch = zig-0.14
51
[submodule "vendor/netsurf/libwapcaplet"]
62
path = vendor/netsurf/libwapcaplet
73
url = https://github.com/lightpanda-io/libwapcaplet.git/

Makefile

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -92,26 +92,21 @@ wpt-summary:
9292

9393
## Test
9494
test:
95-
@printf "\e[36mTesting...\e[0m\n"
96-
@$(ZIG) build test -Dengine=v8 || (printf "\e[33mTest ERROR\e[0m\n"; exit 1;)
97-
@printf "\e[33mTest OK\e[0m\n"
98-
99-
unittest:
100-
@TEST_FILTER='${F}' $(ZIG) build unittest -freference-trace --summary all
95+
@TEST_FILTER='${F}' $(ZIG) build test -freference-trace --summary all
10196

10297
# Install and build required dependencies commands
10398
# ------------
10499
.PHONY: install-submodule
105-
.PHONY: install-zig-js-runtime install-zig-js-runtime-dev install-libiconv
100+
.PHONY: install-libiconv
106101
.PHONY: _install-netsurf install-netsurf clean-netsurf test-netsurf install-netsurf-dev
107102
.PHONY: install-mimalloc install-mimalloc-dev clean-mimalloc
108103
.PHONY: install-dev install
109104

110105
## Install and build dependencies for release
111-
install: install-submodule install-zig-js-runtime install-libiconv install-netsurf install-mimalloc
106+
install: install-submodule install-libiconv install-netsurf install-mimalloc
112107

113108
## Install and build dependencies for dev
114-
install-dev: install-submodule install-zig-js-runtime-dev install-libiconv install-netsurf-dev install-mimalloc-dev
109+
install-dev: install-submodule install-libiconv install-netsurf-dev install-mimalloc-dev
115110

116111
install-netsurf-dev: _install-netsurf
117112
install-netsurf-dev: OPTCFLAGS := -O0 -g -DNDEBUG
@@ -194,14 +189,6 @@ ifneq ("$(wildcard vendor/libiconv/libiconv-1.17/Makefile)","")
194189
make clean
195190
endif
196191

197-
install-zig-js-runtime-dev:
198-
@cd vendor/zig-js-runtime && \
199-
make install-dev
200-
201-
install-zig-js-runtime:
202-
@cd vendor/zig-js-runtime && \
203-
make install
204-
205192
data:
206193
cd src/data && go run public_suffix_list_gen.go > public_suffix_list.zig
207194

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,17 +208,19 @@ Note: when Mimalloc is built in dev mode, you can dump memory stats with the
208208
env var `MIMALLOC_SHOW_STATS=1`. See
209209
[https://microsoft.github.io/mimalloc/environment.html](https://microsoft.github.io/mimalloc/environment.html).
210210

211-
**zig-js-runtime**
211+
**v8**
212212

213-
Our own Zig/Javascript runtime, which includes the v8 Javascript engine.
214-
215-
This build task is very long and cpu consuming, as you will build v8 from sources.
213+
First, get the tools necessary for building V8, as well as the V8 source code:
216214

217215
```
218-
make install-zig-js-runtime
216+
zig build get-v8
219217
```
220218

221-
For dev env, use `make install-zig-js-runtime-dev`.
219+
Next, build v8. This build task is very long and cpu consuming, as you will build v8 from sources.
220+
221+
```
222+
zig build build-v8
223+
```
222224

223225
## Test
224226

0 commit comments

Comments
 (0)