Expand description
Source-aware parsing, modeling, generation, compatibility evaluation, and rendering of Podman Quadlet files.
QuadletLens keeps physical source syntax separate from typed native meaning and target-version
evidence. Parsing and generation are in-memory operations: the crate never invokes Podman,
operates systemd, discovers neighboring files, or mutates a host.
§Parse a document
use quadlet_lens::{
model::{QuadletDocument, QuadletUnitType},
source::SourceId,
};
let source = "[Container]\nImage=example.invalid/web:1\n";
let parsed = QuadletDocument::parse(
QuadletUnitType::Container,
SourceId::new(1),
source,
)
.expect("valid Quadlet input");
assert!(parsed.is_valid());§Modules
syntaxretains ordered physical syntax and renders preserved or canonical text.modelexposes typed native documents and multi-file relationships.renderconstructs and validates new documents.capabilityevaluates evidence over explicit Podman and systemd targets.diagnostic,source, andpathprovide reporting and conservative source metadata.
Modules§
- capability
- Data-driven Quadlet capability catalogue and target-range evaluation.
- diagnostic
- Structured, source-aware syntax diagnostics.
- model
- Source-aware native Quadlet documents and the first-conversion value surface.
- path
- Lexical path forms retained before key-specific Quadlet resolution.
- render
- Validated programmatic construction of deterministic Quadlet documents.
- source
- Source identities, byte spans, and line/column lookup.
- syntax
- Ordered, loss-aware physical-line representation and deterministic rendering.