Lua runner with rich builtin stdlib ("lunascript")
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
luna/docs
Ondřej Hruška 0a1bf00701 add os.args() to stdlib 23 hours ago
..
README.md add os.args() to stdlib 23 hours ago
concurrency.md rebrand to "luna" 1 day ago
fs.md Fix race between spinner animation in weather demo and the network permission prompt 24 hours ago
http.md adjust the permission system to also protect network access 24 hours ago
log.md use LUNA_LOG to set loglevel 1 day ago
math.md rebrand to "luna" 1 day ago
os.md add os.args() to stdlib 23 hours ago
require.md rebrand to "luna" 1 day ago
sqlite.md add prototype permission based fs access 2 weeks ago
table.md rebrand to "luna" 1 day ago
tui.md fix up lua lib and language server config, add stubs, move demos 2 weeks ago
utils.md lua fmt, clean up libs 2 weeks ago

README.md

Luna standard library

Reference docs for the library Luna adds on top of Lua 5.5. Every module below is a global, present in every script with no setup (require-ing one by name also works and returns the same table).

Modules

Module What it covers
utils JSON encode/decode, the NULL marker, error-trapping (try/tryn), value dump.
math Additions to stock math: round, clamp, isFinite, sign, scale.
table Additions to stock table: map/filter/reduce, merge, deep-copy, aggregates, lookups, read-only proxy.
os Sandbox additions: microtime (sub-second clock), async sleep, and args (script arguments).
log Level-tagged diagnostic logging (traceerror), gated by LUNA_LOG.
sqlite Embedded SQLite: connect, query, parameters, transactions.
http HTTP/HTTPS client: requests, JSON, auth, cookie-jar sessions, per-origin permissions.
fs Whole-file read/write and directory listing, behind a per-script folder permission system.
tui Interactive terminal prompts (confirm/text/select/…), ANSI-styled output, message blocks.

Concepts

Page What it covers
Concurrency How async calls suspend, and running work in parallel with task.join.
Modules & require Splitting scripts into files: search roots, LUNA_INCLUDE_PATHS, .env, caching, LSP setup.

See the top-level README for what Luna is and how to build it.