Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions engines/zjs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: 2026 Aneryu
# SPDX-License-Identifier: MIT

ARG BASE=jsz-zig
FROM $BASE

WORKDIR /src
ARG REPO=https://github.com/aneryu/zjs.git
RUN git clone --depth=1 "$REPO" .

ARG REV=main
RUN git fetch --depth=1 origin "$REV" && git checkout FETCH_HEAD && git rev-parse HEAD

RUN case "$(dpkg --print-architecture 2>/dev/null || true)" in \
arm64) zig build zjs -Dcpu=baseline --summary all;; \
amd64) zig build zjs -Dcpu=x86_64_v3 --summary all;; \
*) zig build zjs --summary all;; \
esac

COPY build/dist.py ./
RUN ./dist.py /dist/zjs --binary=/src/zig-out/bin/zjs
8 changes: 8 additions & 0 deletions engines/zjs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-FileCopyrightText: 2026 Aneryu
# SPDX-License-Identifier: MIT

include ../../build/build.mk

SUPPORTED_ARCHS = amd64 arm64

$(eval $(call build_engine,zjs,Dockerfile))
17 changes: 17 additions & 0 deletions engines/zjs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# zjs

Zig-native JavaScript engine, source-aligned with QuickJS.

* Repository: [aneryu/zjs](https://github.com/aneryu/zjs.git) <span class="shields"><img src="https://img.shields.io/github/stars/aneryu/zjs?label=&style=flat-square" alt="Stars" title="Stars"><img src="https://img.shields.io/github/last-commit/aneryu/zjs?label=&style=flat-square" alt="Last commit" title="Last commit"></span>
* LOC: [235432](# "cloc src")
* Language: Zig
* License: MIT
* Standard: ES2023 (partial)
* Years: 2026-
* Ancestor: [QuickJS](../quickjs/README.md)
* Interpreter: stack-based VM
* GC: reference counting with cycle removal

zjs is a Zig rewrite that uses QuickJS as its semantic reference. It provides
a Zig embedding API, a standalone command-line interpreter, and syntax-only
TypeScript erasure. It is not a drop-in replacement for QuickJS's C API.
Loading