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.
Status
- Current version: 0.8.2
- Under active development
Installation
Quick Start
Load a corpus and generate one composed weapon name.
use ;
use *;
let corpus = from_files?;
let ctx = new
// with_rule is chainable
.with_rule
.generate?;
let name = ctx.get_previous.unwrap.value.as_str;
println!;
For a fuller reference workflow, see examples/main.rs.
Core Concepts
- Corpus: A loaded set of documents for one target such as
weaponorperson. - Rules: Composable operations that read pooled values and return generated text.
- Engine: Runs rules in order and stores prior outputs in generation context.
- 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