kiesel-js/web-runtime
2
4
Fork
You've already forked web-runtime
3
🌐 A web compatible runtime for the Kiesel JavaScript engine
  • Zig 100%
Linus Groh 62dab18d61
All checks were successful
CI / lint (push) Successful in 43s
CI / build (push) Successful in 54s
Update to Zig 0.16
2026年05月03日 00:33:15 +01:00
.forgejo/workflows Update to Zig 0.16 2026年05月03日 00:33:15 +01:00
src Update to Zig 0.16 2026年05月03日 00:33:15 +01:00
.gitignore zig-cache -> .zig-cache 2024年06月01日 18:00:21 +02:00
build.zig Update to Zig 0.16 2026年05月03日 00:33:15 +01:00
build.zig.zon Update to Zig 0.16 2026年05月03日 00:33:15 +01:00
LICENSE Initial commit 2024年03月13日 21:17:57 +00:00
README.md Rename to web-runtime 2026年04月14日 22:02:11 +01:00

Kiesel Web Runtime

🌐 A web compatible runtime for the Kiesel JavaScript engine

justforfunnoreally.dev badge License

Introduction

The goal for this project roughly aligns with the WinterTC Minimum Common Web Platform API. Kiesel itself only provides an implementation of ECMA-262 and ECMA-402, other commonly available APIs like console will be implemented here.

Build

To include this runtime in your own project using Kiesel for JS evaluation:

  1. Add the dependency to your build.zig.zon:

    zig fetch --save git+https://codeberg.org/kiesel-js/web-runtime
    
  2. Supply the kiesel module import:

    constkiesel=b.dependency("kiesel");constkiesel_web_runtime=b.dependency("kiesel-web-runtime");kiesel_web_runtime.module("kiesel-web-runtime").addImport("kiesel",kiesel.module("kiesel"));
  3. Add bindings to an object (usually the global object) as follows:

    constkiesel_web_runtime=@import("kiesel-web-runtime");// ...trykiesel_web_runtime.addBindings(realm,global_object);

Available APIs

  • Blob()
  • Blob.prototype.arrayBuffer()
  • Blob.prototype.bytes()
  • Blob.prototype.size
  • Blob.prototype.text()
  • Blob.prototype.type
  • console.assert()
  • console.debug()
  • console.error()
  • console.info()
  • console.log()
  • console.warn()
  • crypto.getRandomValues()
  • crypto.randomUUID()
  • fetch() (using synchronous networking for now. sue me)
  • navigator.userAgent
  • performance.now()
  • performance.timeOrigin
  • queueMicrotask()
  • TextDecoder()
  • TextDecoder.prototype.decode()
  • TextDecoder.prototype.encoding
  • TextDecoder.prototype.fatal
  • TextDecoder.prototype.ignoreBOM
  • TextEncoder()
  • TextEncoder.prototype.encode()
  • TextEncoder.prototype.encoding