🌐 A web compatible runtime for the Kiesel JavaScript engine
Find a file
Linus Groh d5df4632d2
All checks were successful
CI / lint (push) Successful in 1m44s
CI / build (push) Successful in 2m43s
Add display names
2025-12-03 23:27:14 +00:00
.forgejo/workflows Update to Zig 0.15.2 2025-10-15 15:28:33 +02:00
src Add display names 2025-12-03 23:27:14 +00:00
.gitignore zig-cache -> .zig-cache 2024-06-01 18:00:21 +02:00
build.zig Update for new std.Build API 2025-07-19 16:05:11 +01:00
build.zig.zon Update to Zig 0.15.2 2025-10-15 15:28:33 +02:00
LICENSE Initial commit 2024-03-13 21:17:57 +00:00
README.md WinterCG -> WinterTC 2025-03-04 22:05:59 +00:00

Kiesel 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

This is included in the kiesel CLI by default, follow the instructions in the main repo.

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

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

  2. Supply the kiesel module import:

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

    const kiesel_runtime = @import("kiesel-runtime");
    // ...
    try kiesel_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