aethellib
aethellib is a Rust library for composable text generation from target-specific TOML corpora with source provenance tracking.
What It Does
- Loads and validates attributed TOML documents into a single-target corpus.
- Pools values by section and field for rule-based generation.
- Runs composable generation rules through an execution engine.
- Preserves value provenance so outputs can be traced to source data.
Installation
Quick Start
Load a corpus, build a typed plan, compile once, and generate.
use typed;
use *;
let prefix = new?;
let kind = new?;
let weapon_name = new?;
let corpus = from_files?;
let compiled = new
.rule
.validate?
.compile?;
let mut rng = rng;
let ctx = compiled.generate?;
let name = ctx.require?.value;
println!;
For full reference workflows, see examples/unified_api.rs and examples/main.rs.
Core Concepts
- Corpus: A loaded set of documents for one target such as
weaponorperson. - Rule Expressions: Typed operations that read pools and compose generated text.
- Compiled Plan: Validated execution graph that runs in dependency order.
- Provenance: Generated values carry source metadata for traceability.
Design Philosophy
- Keep the core focused on single-target corpus loading and generation primitives.
- Prefer composable building blocks over a rigid generation DSL.
- Treat provenance as first-class so generated outputs remain explainable.
- Keep dependencies minimal and behavior explicit.
Contributing
Contributions are welcome.
Before opening a pull request, run:
If you change API behavior, include updates to examples and tests in the same PR.
License
Apache License 2.0.
Author
Arad Fadaei