Modules and resource limits
Modules
Section titled “Modules”A HollowScript program can be split across files, called modules. One is the entry module; the others are reached with import, using a relative path with no extension:
import Point, origin from "./shapes"Names bind directly and keep their names, there is no renaming, no wildcard import, and no re-export: a module that imports a name cannot turn around and export it. Only a declaration marked export (fn, record, enum or constant) can be imported by another file. A capability can never leave a module through an export, only be threaded through as an ordinary parameter, so importing a module can never silently hand it a capability it did not itself declare with uses.
Because a runnable example needs at least two files, this tour does not embed one inline. The full walkthrough, with the exact resolution rules for paths, cycles and initialisation order, is Chapter 10 of the specification; the worked example at section 10.5 shows a small program split into three files and the order they run in.
Resource limits
Section titled “Resource limits”Every HollowScript run is bounded, on every conforming implementation, by the same fixed limits: a step count, a memory allowance covering both what a run allocates and what it keeps around afterwards, an output size, and a call depth, plus a cancellation mechanism a host can trigger from outside. Reaching a limit is a fault: the run stops, cannot be caught, and cannot be defeated by the program, so a hostile or simply buggy script ends in a clean, defined failure rather than a hang or a crash of the host. The defaults (100,000,000 steps, 64 MiB of memory, 16 MiB of output, a call depth of 1,000) are part of the language, not of one implementation’s choices, and apply whenever a host sets nothing. A host may set each one to any value it likes, lower for a stricter sandbox or higher if it accepts the extra risk, but it can never switch a limit off: every run is bounded by something, however large. See Chapter 11 for exactly what each limit counts and how faults are reported.