Reference

Luwu provides a small set of functions and libraries to manipulate builtin data types and language features.

Keep in mind that since Luwu is an embeddable and sandboxed programming language, it does not ship with any significant access to the host's environment. This means if you need to read files, fetch a website, or access environment variables, you need to use a Luwu runtime that exposes such APIs to user code.

Libraries

Most library APIs are inherited from Luau 0.730, however we've added additional functions to existing libraries (such as string.startswith) as well as new libraries altogether.

string

Searching, slicing, formatting, splitting and trimming strings, and packing binary data into them.

table

Create, insert into, remove from, search, sort, copy and freeze tables.

math

Rounding, trigonometry, logarithms, random numbers, noise and numeric constants.

buffer

Fixed-size blocks of mutable memory for reading and writing binary data.

bit32

Bitwise and, or, xor, shifts, rotations and bit fields on 32-bit integers.

utf8

Counting, encoding and decoding the Unicode characters in UTF-8 strings.

coroutine

Coroutines: an async and interleaving primitive that embedders use more than scripts do nowadays.

os

Read the clock, turn timestamps into dates and measure how long code takes.

debug

Inspect the call stack and the functions on it.

vector

Three-component vectors for positions and directions.

integer

Arithmetic, comparison and bitwise functions for 64-bit signed integers.

class

Check what class or trait a value belongs to and read a class's name and fields.

collections

Builtin classes for bundles, ordered maps, growable arrays, queues, options and results.

Primitives

See Primitives

Primitives are data types built directly into the VM; these are often much more optimized than user-defined data structures.

Globals

See the full list: Globals

Luwu's builtin functions and libraries are available in the global environment and are not explicitly imported via require.

Most embedders add some additional globals to their environment, and many override builtin functions such as print, pcall, and error to add pretty printing and custom error handling.