Skip to main content

Crate aura_lang

Crate aura_lang 

Source
Expand description

The Aura configuration language: a library, and the aura CLI behind the default cli feature.

§Which surface is supported

facade is the API for embedding. It takes a path or a set of in-memory buffers and returns serde_json::Value together with plain diagnostics, and it is the part meant to stay stable.

To call into a script — a manifest’s pub def, per request or per batch — use Script (D33): hermetic by default, a budget on every call, constant memory per call, and Send + Sync.

The layers beneath — lexer, parser, eval, source, resolve — are public because tools need them: the language server and the browser playground. They are useful and they are not frozen. While the project is 0.x they may change in a minor release, so prefer facade unless you need something it does not expose.

Embedding the library alone:

[dependencies]
aura-lang = { version = "0.1", default-features = false }

Re-exports§

pub use eval::budget::Budget;
pub use eval::budget::Usage;
pub use script::Args;
pub use script::EffectFn;
pub use script::Error;
pub use script::Function;
pub use script::PureFn;
pub use script::Script;
pub use script::ScriptBuilder;
pub use script::ScriptVersion;

Modules§

agentdocs
The language, rendered for a coding assistant: aura docs --agent.
analysis
Static analysis (SPEC §6.1): a single AST pass with a scope stack mirroring the Environment. Runs before the runtime.
codegen
aura types: generate host-language types from a manifest’s type and enum declarations (SPEC §7.2).
error
eval
Evaluation engine (SPEC §4). Deterministic tree-walking interpreter with a capability model for effects (D1).
facade
A high-level facade for embedding Aura in Rust applications.
fmt
aura fmt: canonical formatter (SPEC §7.2).
host
Host functions (D35): what a host provides, and what a script asks for.
lexer
parser
Recursive descent + Pratt expression parser (SPEC §3).
resolve
Name resolution: which binding does each identifier occurrence refer to?
script
The embedding API (D33): a loaded script a Rust host can call.
serialize
Value -> serde_json serialization (SPEC §7.1). Int -> JSON integer with no precision loss (D6); a Schema/Function/Enum deep in the tree is E0601 with a key path.
source
The source owner (SPEC §1.2): every &'a str in the lexer/AST/Value borrows from here. An append-only arena: entries are never removed or mutated.
span
vfs
Virtual File System (SPEC §5): module resolution and loading behind a trait.

Constants§

STDLIB_MANIFEST
The stdlib surface as an Aura manifest: every method’s parameters, return type and one-line description, grouped by receiver.