JaB - JavaScript bindings for Beagle

JaB is a WebKit JSC based runtime with a set of js bindings for libabc and libdog. It is a way to extend Beagle with arbitrary scripts to automate routines and workflows. The runtime binary is jab (formerly jabc), divorced from be: be links no JSC and runs no JS, while jab resolves and runs scripts kept in the be/ submodule (see Extensions, Verbs).

Invocation — jab [path] args

The jab binary is a standalone runner; the first argument picks one of two modes, and everything after it reaches the script as args (and Node-ish process.argv).

require() machinery

A bare name — a CLI argument or a require("name") — resolves by scanning UP for a be/ dir; an explicit path resolves node-style, so a script set versions independently of where it runs.

Bindings

JaB exposes libabc and libdog as a flat set of global modules — thin syscall/format leaves holding no memory across the boundary (only JS-owned buffers and fds cross). Install order is fixed in main.cpp.