Skip to content

The standard library

Built in, and shared by the interpreter and the WebAssembly backend. A function that touches the outside needs a permission in needs.

Area Functions
Effects (need needs) read, write, exists, list_dir, run, fetch, env, now, random
Text len, lower, upper, trim, split, lines, join, replace, repeat, contains, starts_with, ends_with, index_of, slice, chars, str, format_time
Numbers int, float, floor, ceil, round, sqrt, pow, max, sum
Lists map, filter, fold, find, first, last, push, take, drop, range, reverse, sort, sort_by, all, any
Maps map_new, map_set, map_get, map_has, map_keys, map_values, map_remove
Options unwrap_or, is_none, Some, None
Paths join_path, path_name, path_parent, path_stem, path_ext
Data json_parse, json_stringify, regex_find, regex_replace, matches
Secrets secret_eq
Tasks spawn, await, cancel
Testing assert, assert_eq, panic

sub explain lists the calls a script makes and what allowed each one.