Lint / lint (push) Successful in 10s
Details
Test / test (push) Successful in 41s
Details
Build / build (push) Successful in 5m3s
Details
See: https://github.com/ziglang/zig/pull/17248 |
||
---|---|---|
.forgejo/workflows | ||
src | ||
vendor | ||
.gitignore | ||
.gitmodules | ||
LICENSE | ||
README.md | ||
build.zig | ||
build.zig.zon |
README.md
Kiesel
⚡ A JavaScript engine written in Zig
What is this?
Kiesel is a JavaScript engine written from scratch for the purpose of me learning the Zig programming language, with the eventual goal of full support for the latest ECMAScript standard. It features a custom bytecode VM and runtime, and uses bdwgc for garbage collected allocations.
A simple CLI/file interpreter is available but it also aims to be easily embeddable into other projects.
The implementation style is similar to LibJS (the JS engine used in SerenityOS and the Ladybird browser which I also work on) in various aspects, most notably the desire to stay very close to spec. Despite these similarities and my involvement in both projects, Kiesel is not intended as a successor to LibJS in any way :^)
Development is still at an early stage and the engine not actually useful at this point. Pull requests and issues are disabled for the time being, if you want to report a bug (not missing feature, most features are missing!), please ping me directly.
Further reading:
- Kiesel Devlog #1: Now passing 25% of test262!
- Kiesel Devlog #2: Iterators, more math, and a bug in the Zig stdlib
- Kiesel Devlog #3: Accessors, Date/Map/Set, test262 history graph
Build
Dependencies managed through build.zig.zon
will be
installed automatically when building for the first time, to fetch vendored
dependencies run:
git submodule update --init --recursive
To build and run the Kiesel CLI:
zig build run
NOTE: Kiesel targets the master branch of Zig. This means that the build breaks semi-regularly, which I will usually fix as soon as I notice.
Usage
Usage: kiesel [options] [args]
Options:
-c, --command Run the given code as a script
--disable-gc Disable garbage collection
--print-ast Print the parsed AST
--print-bytecode Print the generated bytecode
-p, --print-result Print the evaluated result
-v, --version Print version information and exit
-h, --help Print help text and exit
Arguments:
file The JS file to run, a REPL is started if omitted