AAYU Standard Libraries (All 16 Production Modules)
Production-ready, deterministic standard libraries running natively on the AAYU Silicon Stack VM. Every module is importable with standard import "std/<name>" syntax.
Dynamic arrays, selection sort, string tokenization, functional predicates, and zero-boilerplate number parsing.
import "std/collections"
let s = sorted([50, 10, 40])
let money = parse_ints(split("10 20 30", " "))
print("Total: " + sum(money))Hardware-level arithmetic, square roots via Newton-Raphson approximation, power exponentiation, and neural activations.
import "std/math"
let root = sqrt(49.0)
let bound = clamp(root * 2.5, 0.0, 10.0)
print("Bounded root: " + bound)Autonomous AI coding guard, anti-hallucination syntax checking, context handoff snapshotting, and architectural freeze protection.
import "std/brain"
let check = brain_is_frozen("Lexer")
let report = brain_security_guard(apiKeySnippet)
print("Is Frozen: " + check)Native host platform discovery, CPU architecture querying, process signals, and type inspection.
import "std/os"
print("Platform: " + get_os())
print("Architecture: " + get_architecture())File reading and writing, path manipulation, extension parsing, and existence checking.
import "std/fs"
let p = format_path("data", "app.ay")
let ext = get_extension("archive.tar.gz")
print("Path: " + p + " (" + ext + ")")Pure AAYU dual-polynomial polynomial cryptographic hashing, accumulator digests, and Merkle tree root computations.
import "std/crypto"
let digest = hash_string("INTENT-TO-SILICON")
print("SHA-equivalent Digest: " + digest)RFC 8259 compliant JSON stringify, quotation escaping, and key-value pair formatting without external packages.
import "std/json"
let pair = json_format_pair("version", json_quote("1.2.0"))
print(pair)In-memory relational record store, primary key lookups, and dynamic multi-attribute query filtering.
import "std/db"
let r1 = db_create_record(1, "Post", 100)
let found = db_find_by_id([r1], 1)
print("Found: " + found["name"])Vector arithmetic, matrix-vector multiplication, multi-layer perceptron (MLP) forward passes, and anomaly scoring.
import "std/ai"
let res = vec_add([1.0, 2.0], [10.0, 20.0])
print("Result: [" + res[0] + ", " + res[1] + "]")Widget-tree primitives (Column, Row, Text, Button, Card) rendering directly into clean zero-dependency HTML/CSS.
import "std/ui"
let tree = create_column([create_text("AAYU"), create_button("Run", "start")])
let html = render(tree)
print(html)Immutable transaction state transitions, UTXO balance verification, and invariant rule assertion.
import "std/ledger"
let ok = verify_balance(500, 100, 5)
let next = apply_transfer(500, 200, 100)
print("Sender Bal: " + next[0])Human-readable, comment-aware serialization protocol with automatic comment stripping and dictionary bridging.
import "std/ayon"
let clean = ayon_strip_comments("# Note\nkey: \"value\"")
print(clean)HTTP protocol parsing, URL scheme extraction, standard status code validators, and wire payload formatting.
import "std/http"
let proto = parse_url_protocol("https://aayu.dev")
print("Protocol: " + proto + " | OK: " + status_is_ok(200))HTTP response builders, MIME content-type headers, and JSON/HTML response formatters.
import "std/server"
let resp = json_response(200, "{\"status\":\"ready\"}")
print(resp)Zero-dependency assertion engine, test suite coordinator, and test runner with granular value and type-coerced validation.
import "std/test"
test_begin_suite("Math Suite")
assert_eq(sqrt(81.0), 9.0, "Root check")
test_end_suite()Design-by-Contract verification primitives for mission-critical intent enforcement, type checking, and system invariants.
import "std/contracts"
action withdraw(bal, amt)
require(amt > 0, "positive amount")
return bal - amt
endDeterministic Execution on Native Silicon
All 14 standard libraries compile directly to compact bytecode and execute on the Rust Silicon Stack VM with zero external runtime dependencies.