-
Notifications
You must be signed in to change notification settings - Fork 62
Libraries Provided by Higgs
This is a list of JavaScript libraries that are included in the Higgs repository and the default Higgs installation.
Higgs comes with "batteries included". These custom libraries are not part of the JavaScript standard, but ship with Higgs:
- console (console logging)
- csv (Comma Separated Value spreadsheets)
- dir (directory tree traversal)
- draw (2D drawing)
- ffi (Foreign Function Interface)
- random (Random numbers and actions)
- stdio (C stdio)
- stdlib (C stdlib)
- test (unit test utilities)
To access any of these libraries, import them with the require('lib/libname')
syntax, for example:
io = require('lib/stdio')
These libraries are part of the JavaScript standard and are automatically accessible in Higgs, you do not need to import them. Loading of these libraries can be disabled by starting Higgs with the --nostdlib
option.
- stdlib/array (MDN documentation)
- stdlib/boolean (MDN documentation)
- stdlib/date (MDN documentation)
- stdlib/error (MDN documentation)
- stdlib/function (MDN documentation)
- stdlib/global (MDN documentation)
- stdlib/json (MDN documentation)
- stdlib/map (MDN documentation)
- stdlib/math (MDN documentation)
- stdlib/number (MDN documentation)
- stdlib/object (MDN documentation)
- stdlib/regexp (MDN documentation)
- stdlib/string (MDN documentation)
The runtime library is always loaded by Higgs and cannot be disabled. It is a self-hosted implementation of core JavaScript primitives, such as arithmetic and bitwise operators. The runtime is the foundation on which the standard library is built. It is implemented in an extended JavaScript dialect using special low-level primitives which allow direct expression of operations such as type tag tests, pointer arithmetic and machine integer addition.