Skip to content

HollowScript

A small, embeddable, statically typed programming language with capability-based security, in the class of Lua.

Small and embeddable

No garbage-collector tuning, no ambient authority, and a specification short enough to read end to end. HollowScript is designed to be embedded in a host application, not to run standalone servers.

Statically typed

Every expression has a type known before the program runs. Optionals, records, enums, generics and a real Result type replace exceptions, null and any.

Capability based

A program cannot print, read a clock, open a file or reach the network unless the host has granted it and the script has declared it with uses. Reading a file’s first few lines tells you everything it can touch.

Designed for untrusted scripts

The specification bounds steps, memory, output and call depth for every conforming implementation, so a script that runs away is meant to end in a fault, not a hang or a crash. The native runtime has not yet had its independent security review, so treat this as a design goal until it has.

uses print
record Task = { title: String, priority: Int, done: Bool }
fn describe(t: Task): String {
if t.done {
return "${t.title}: done"
}
return "${t.title}: priority ${t.priority}"
}
constant tasks: [Task] = [
{ title: "Write the parser", priority: 1, done: false },
{ title: "Freeze the spec", priority: 1, done: true },
]
for t in tasks {
effect print(describe(t))
}

Tour

A friendly, non-normative walk through the language: values, types, functions, pattern matching, errors and capabilities, with runnable examples.

Specification

The complete, normative language specification: lexical structure, types, effects, the standard library and every diagnostic code.