assay-lua 0.16.6

General-purpose enhanced Lua runtime. Batteries-included scripting, automation, and web services.
Documentation
[package]
name = "assay-lua"
version = "0.16.6"
categories = ["command-line-utilities", "development-tools::testing"]
edition = "2024"
homepage = "https://assay.rs"
keywords = ["lua", "scripting", "automation", "runtime", "kubernetes"]
license = "Apache-2.0"
repository = "https://github.com/developerinlondon/assay"
description = "General-purpose enhanced Lua runtime. Batteries-included scripting, automation, and web services."

[[bin]]
name = "assay"
path = "src/main.rs"
required-features = ["cli"]

[lib]
name = "assay"
path = "src/lib.rs"

[features]
# assay-lua (v0.13.0+, rev 2) is a pure Lua runtime + HTTP client. Workflow
# and auth live in `assay-engine`; this binary talks to a deployed engine over
# HTTP (see plan 12 Architecture Principle 8).
default = ["db", "server", "cli"]
db = ["dep:sqlx"]
server = ["dep:http-body-util", "dep:hyper", "dep:hyper-util"]
cli = ["dep:clap", "dep:clap_complete", "dep:tracing-subscriber"]

[dependencies]
# Lua scripting engine
mlua = { version = "0.11.6", features = ["lua55", "vendored", "async", "serialize"] }

# HTTP client
reqwest = { version = "0.13.2", features = ["json", "rustls", "query", "stream"], default-features = false }

# Async runtime
tokio = { version = "1.49.0", features = ["full"] }

# Serialization
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
serde_yml = "0.0.12"

# CLI (optional — only needed for the assay binary)
clap = { version = "4.5.57", features = ["derive", "env"], optional = true }
clap_complete = { version = "4.5", optional = true }

# Error handling
anyhow = "1"
thiserror = "2"

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"], optional = true }

# JWT signing (RS256)
jsonwebtoken = { version = "10.3.0", features = ["rust_crypto"] }
zeroize = "1.8.2"

# Base64 encoding/decoding
data-encoding = "2.10.0"

# Embed stdlib .lua files in binary
include_dir = "0.7.4"

# Hashing (SHA1 + SHA2 + SHA3). SHA1 is required for the WebSocket
# server-upgrade handshake (Sec-WebSocket-Accept = base64(SHA1(key + magic))).
digest = "0.10.7"
sha1 = "0.10.6"
sha2 = "0.10.9"
sha3 = "0.10.8"

# Secure random
rand = "0.10.0"

# Lightweight regex
regex-lite = "0.1.9"

# OCI container registry operations (push, pull, copy, mutate)
# default-features disabled to drop native-tls/openssl; the rest of the
# codebase is rustls-only and the Ubuntu CI runner has no OpenSSL headers.
oci-distribution = { version = "0.11", default-features = false, features = ["rustls-tls-native-roots"] }

# Process signals (kill)
libc = "0.2"

# Glob pattern matching
glob = "0.3.3"

# Tar archive support
tar = "0.4.45"

# TOML parsing/encoding
toml = "0.9.12"

# SQL database (optional — Postgres, MySQL, SQLite)
sqlx = { version = "0.8.6", features = ["runtime-tokio-rustls", "postgres", "mysql", "sqlite", "any"], optional = true }

# WebSocket client
futures-util = "0.3"
tokio-tungstenite = { version = "0.28.0", features = ["connect", "rustls-tls-webpki-roots"] }

# Template engine (Jinja2-compatible)
minijinja = { version = "2.15.1", features = ["loader"] }

# Markdown to HTML conversion
pulldown-cmark = "0.13"

# Decompression (gunzip/unxz/unzstd builtins)
flate2 = "1"
xz2 = "0.1"
zstd = "0.13"

# URL parsing/encoding (used by http server query string decoding)
url = "2"

# HTTP server (optional — only needed for http.serve() Lua builtin)
axum = "0.8.8"
http-body-util = { version = "0.1", optional = true }
hyper = { version = "1", features = ["http1", "server"], optional = true }
hyper-util = { version = "0.1", features = ["tokio"], optional = true }
tower = { version = "0.5", features = ["util"] }
tower-http = { version = "0.6.8", features = ["cors", "trace"] }

[dev-dependencies]
tempfile = "3.27.0"
tokio-test = "0.4"
wiremock = "0.6.5"

# Linux-only dependencies (linux/cgroup/systemd builtins). On non-Linux
# targets the modules register tables whose functions return runtime errors.
[target.'cfg(target_os = "linux")'.dependencies]
# /proc and /sys/fs reader (linux builtin)
procfs = { version = "0.17", default-features = false }

# D-Bus client (systemd builtin: org.freedesktop.systemd1, org.freedesktop.machine1)
zbus = { version = "5", default-features = false, features = ["tokio"] }

# dlopen libsystemd.so.0 at runtime for journal_follow (no libsystemd-dev needed)
libloading = "0.8"

# Unix-family deps (process.spawn_pty builtin). Linux + macOS only; openpty +
# friends. Other targets register a stub spawn_pty that errors at runtime.
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
nix = { version = "0.30", default-features = false, features = ["term"] }