Expand description
The tatara-script stdlib. Each module registers a family of FFI
primitives on Interpreter<ScriptCtx>; install_stdlib is the
single entry point — call after Interpreter::new().
install_stdlib also calls tatara_lisp_eval::install_primitives,
install_hof, and install_map up front so arithmetic, comparison,
list primitives (+, -, =, car, cdr, cons, list, …) AND
higher-order list ops (map, filter, reduce, foldl, foldr,
for-each, apply, find, every?, any?, partition,
group-by, sort-by, iterate, take-while, drop-while,
remove, count-if, find-index, scan-left, repeatedly,
some) and (map …) constructors / accessors are available to any
script. Without these, Interpreter::new() is intentionally bare —
the evaluator leaves primitive registration to the embedder, and
historically install_stdlib here only wired primitives so HOFs
were silently absent at script runtime.
Anything beyond these (Lisp-source stdlib like compose, pipe,
->, ->>, defflow, dotimes, distinct, group-by helpers)
lives in tatara-lisp-eval::install_lisp_stdlib_with and requires a
host context — it’s deliberately NOT installed here today since
tatara-script’s per-script ScriptCtx isn’t available at
install-time. Call install_lisp_stdlib_with from your binary if
you need it.
Modules§
- cli
- Argument parsing — small, script-focused.
- crypto_
extra - Additional hashes + HMAC + random/uuid.
- dns
- DNS provider domain — the
pleme/dnssurface. - encoding
- Common text encodings.
- env
- Environment-variable access.
- fs
- Filesystem primitives — directories, globs, metadata, temp files.
- hash
- Hash functions.
- http
- HTTP client.
- http_
server - HTTP server.
- io
- File I/O + stdout/stderr.
- json
- JSON parse + stringify, mapping to the tatara-lisp
Valuetree. - kube
- Kubernetes auth + URL helpers.
- list_
ext - Extended list operators beyond tatara-lisp-eval’s primitives.
- log
- Structured logging to stderr. Level-aware — respects TATARA_LOG env variable (debug | info | warn | error). Default level is info.
- module
- Module system —
(require "path.tlisp"). - os
- OS introspection — the few knobs scripts actually need.
- process
- Process / shell integration.
- regex
- Regular expressions (rust
regexcrate under the hood). - sops
- SOPS-decrypt primitive. Shells out to the system
sopsbinary — no point re-implementing age/PGP in-process when the CLI is a one-liner and all the surrounding tooling already assumes it. - string
- String helpers beyond what tatara-lisp-eval::primitive provides.
- string_
ext - Extended string operators beyond tatara-lisp-eval primitives.
- time
- Time + duration helpers.
- toml
- TOML parse + stringify. Same
Valueshape as JSON/YAML (objects become alists of 2-lists) soalist-getworks uniformly. - uuid
- UUID generation — small, no
uuidcrate dep. - yaml
- YAML parse → tatara-lisp
Valuetree. Shape matches the JSON mapping (objects → alists of 2-lists), soalist-getworks identically for YAML and JSON documents.
Functions§
- install_
stdlib - Install every stdlib family. Three layers, in order: