Skip to main content

Crate a2ml

Crate a2ml 

Source
Expand description

§a2ml

Parser and renderer for A2ML (Attested Markup Language).

A2ML is a lightweight markup format designed for AI-agent communication that carries built-in attestation metadata, enabling provenance tracking and trust-level annotations on document content.

§Quick start

use a2ml::parser::parse;
use a2ml::renderer::render;

let input = "# Hello\n\n@version 1.0\n\nA paragraph.";
let doc = parse(input).unwrap();
let output = render(&doc).unwrap();

§Modules

  • types — Core data structures (Document, Block, Inline, etc.)
  • parser — Parse A2ML text into a Document
  • renderer — Render a Document back to A2ML text
  • error — Error types

Re-exports§

pub use error::A2mlError;
pub use types::Attestation;
pub use types::Block;
pub use types::Directive;
pub use types::Document;
pub use types::Inline;
pub use types::Manifest;
pub use types::TrustLevel;

Modules§

error
Error types for A2ML parsing and rendering.
parser
Line-by-line parser for A2ML documents.
renderer
Renderer that serialises A2ML data types back to A2ML text format.
types
Core data types for A2ML documents.