Skip to content
jess
api

The @dream modules

The native primitives under jess: files, bytes, processes, the network, and text, from L3i, each behind a named capability.

require('@dream/bytes' | '@dream/data' | '@dream/dns' | '@dream/fs' | '@dream/intern' | '@dream/intl' | '@dream/luau' | '@dream/process' | '@dream/tcp' | '@dream/tls' | '@dream/udp')

Jess runs Luau on L3i, and L3i brings the modules that touch the operating system: the @dream/* names. They are the whole native floor under a script. Everything jess adds on top is Luau, and everything below them is L3i's.

L3i documents them, on its built-in extensions page, and this page won't repeat it. What jess adds is the capability gate: a module's functions that reach outside the VM check a named capability at the native seam, and a runtime that wasn't granted it refuses, naming the function and the capability. Nothing is denied quietly, and nothing is granted by default except your terminal and the input devices in front of you.

$ jess run read.jsl
error: dream.fs.readFileString: needs the 'filesystem.read' capability, which this runtime does not grant

$ jess run env.jsl
error: dream.process.env: needs the 'process.environment' capability, which this runtime does not grant

jess.granted asks before reaching; Capabilities lists every name, what grants it, and what asks for it.

ModuleWhat it isCapability
@dream/bytesBuffer search and slicing, digests, Deflate, Zstandard and LZMA, text encodings, varints, and regular expressions as bytes.regexnone
@dream/dataWhole-buffer arithmetic: sums, extrema, sorting, gathering, scattering, and partitioning over typed buffersnone
@dream/dnsName resolutionnetwork.dns.resolve
@dream/fsFiles and folders: read, write, list, pathsfilesystem.read for every read, filesystem.write for every change to the disk
@dream/internString interning, one table of unique stringsnone
@dream/intlLocales, plural rules, number and date formatting; what @jess/l10n is built onnone
@dream/luauLuau's own parser, as data; what @jess/analysis and @jess/style are built onnone
@dream/processThe environment, the standard streams, and child processesprocess.environment for env, process.stdio for write, process.spawn for run
@dream/tcpStreams, listeners, and a pollernetwork.tcp.connect to connect out; network.tcp.listen to listen on loopback, plus network.tcp.public to bind a wildcard or non-loopback address
@dream/tlsTLS sessions over a connected TCP streamnone of its own: making the stream took network.tcp.connect or network.tcp.listen
@dream/udpAn authenticated datagram transport, client and servernetwork.transport

jess luau-types writes a stub for each under types/dream/, and the .jessrc that jess init writes aliases @dream/ to them, so local fs = require '@dream/fs' is fully typed under --!strict without an annotation. The stubs describe the L3i the jess you have was built against; regenerate them when you upgrade.

Two things are jess's, not L3i's, and have pages here: @dream/fs is where @jess/backup comes in, and the require that resolves these names is jess's.

Related: Capabilities, jess run --capability.