Skip to content

ml-in-barcelona/quickjs.ml

Repository files navigation

quickjs

quickjs.ml is a set of OCaml bindings for QuickJS, a small and embeddable JavaScript engine. It supports the ES2020 specification including modules, asynchronous generators, proxies and BigInt.

This project exposes two libraries:

  • quickjs.bindings the raw QuickJS C API

  • quickjs a polished API on top of quickjs.bindings with the same shape as the JavaScript API

Motivation

The purpose of this project is to provide the same behaviour as the JavaScript engines from browsers (SpiderMonkey, JavaScriptCore, ChakraCore, v8) into native OCaml. So code that runs in the browser (via Melange) can be run in native with the same results.

Documentation

API reference

Status

This is a work in progress, and currently only includes bindings to RegExp (binded to libregexp) check the to bind issues from the issue tracker.