aeri 0.2.4

Aeri is a Cardano smart contract language by Knott Dynamics, created by Trevor Knott, with its official compiler and CLI.
Documentation
//! Official compiler and tooling API for Aeri, a Cardano smart contract
//! language by Knott Dynamics, created by Trevor Knott.
//!
//! Aeri defines a typed `.aeri` source language for validators, helper
//! functions, custom data types, constants, pattern matches, and pure tests.
//! This crate provides the official compiler, CLI, and Rust API for checking,
//! testing, formatting, linting, inspecting, documenting, and compiling Aeri
//! contracts.
//!
//! Supported contracts are compiled to textual preview IR or constrained Plutus V2
//! UPLC/CBOR outputs. Unsupported ledger behavior is surfaced as explicit blockers
//! so partially lowered code is never presented as deployable script output.
//!
//! # Compile A Module
//!
//! ```
//! use aeri::compile_source;
//!
//! let source = r#"
//! module demo;
//!
//! validator gate(redeemer: ByteArray, ctx: Tx) {
//!   redeemer == #01
//! }
//! "#;
//!
//! let output = compile_source("demo.aeri", source)?;
//! assert_eq!(output.validator_count, 1);
//! # Ok::<(), aeri::AeriError>(())
//! ```
//!
//! # Main Entry Points
//!
//! - [`compile_source`] parses, checks, and lowers one module.
//! - [`format_source`] returns canonical Aeri source formatting.
//! - [`run_tests_source`] executes deterministic pure test blocks.
//! - [`lint_source`] reports contract-oriented lint warnings.
//! - [`estimate_source`] produces static size and budget estimates.
//! - [`docs_source`] generates Markdown API summaries for Aeri modules.
//! - [`build_uplc_blueprint`] emits validated deployable UPLC artifacts.
//! - [`build_uplc_project_blueprint`] merges multiple validated project modules.
//!
//! The `aeri` binary provides project-level build, check, test, lint, format,
//! inspect, documentation, cost, and verification workflows.
#![warn(rustdoc::broken_intra_doc_links)]

/// Abstract syntax tree definitions for parsed Aeri modules.
pub mod ast;
/// Backend target metadata and preview rendering.
pub mod backend;
/// Source checking, lowering, and blueprint generation.
pub mod compile;
/// Deterministic static cost estimation.
pub mod cost;
/// Source spans, compiler errors, and the crate result type.
pub mod diagnostic;
/// Markdown documentation generation for Aeri modules.
pub mod docs;
/// Deterministic evaluator for pure Aeri test blocks.
pub mod eval;
/// Canonical Aeri source formatting.
pub mod format;
/// Structured compiler and UPLC inspection reports.
pub mod inspect;
/// Aeri intermediate representation and validation.
pub mod ir;
/// Source tokenization.
pub mod lexer;
/// Contract-oriented source linting.
pub mod lint;
/// Aeri module parsing.
pub mod parser;
/// Builtin and source type definitions.
pub mod types;
/// UPLC lowering, validation, flat encoding, and CBOR emission.
pub mod uplc;

pub use compile::{
    CompileOutput, UplcValidatorArtifact, build_uplc_blueprint, build_uplc_project_blueprint,
    compile_source, merge_blueprints, try_merge_blueprints,
};
pub use cost::{CostReport, ValidatorCost, estimate_source};
pub use diagnostic::{AeriError, Result};
pub use docs::{docs_source, render_module_docs};
pub use eval::{TestReport, TestResult, run_tests_source};
pub use format::format_source;
pub use lint::{LintWarning, lint_source};