genja-core
genja-core contains the shared runtime primitives used by Genja's Rust and
Python-facing crates.
Most applications should depend on the higher-level genja crate. Use
genja-core directly when you need to build integrations around Genja's core
types, such as inventory models, settings loading, task definitions, task
results, connection state, or processor behavior.
Features
- Inventory types for hosts, groups, host variables, and connection metadata
- Settings models and file loading for JSON, YAML, and TOML configuration
- Task traits, task metadata, task runtime context, and structured task results
- Connection state and task connection resolver traits for runtime integrations
- Processor result handling used by task execution
- Re-exported task authoring macros from
genja-core-derive
Installation
[]
= "0.1.0"
Example
Load settings from a configuration file:
use Settings;
let settings = from_file?;
# Ok::
Build inventory data in code:
use ;
let mut hosts = new;
hosts.add_host;
let inventory = builder.hosts.build;
assert_eq!;
Task Authoring
genja-core re-exports the #[genja_task(...)] macro used to define task
metadata and runtime entrypoints.
use genja_task;
use Host;
use ;
;
For complete application examples, see the
quickstart guide and the top-level
genja crate.