1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! Official compiler and tooling API for Aeri, the Cardano smart contract
//! language created by Trevor Knott at Knott Dynamics.
//!
//! 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. The supported backend subset emits Plutus V2 UPLC/CBOR artifacts;
//! unsupported ledger behavior is reported as a blocker instead of being
//! presented as deployable 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.
//!
//! The `aeri` binary provides project-level build, check, test, lint, format,
//! inspect, documentation, cost, and verification workflows.
/// Abstract syntax tree definitions for parsed Aeri modules.
/// Backend target metadata and preview rendering.
/// Source checking, lowering, and blueprint generation.
/// Deterministic static cost estimation.
/// Source spans, compiler errors, and the crate result type.
/// Markdown documentation generation for Aeri modules.
/// Deterministic evaluator for pure Aeri test blocks.
/// Canonical Aeri source formatting.
/// Structured compiler and UPLC inspection reports.
/// Aeri intermediate representation and validation.
/// Source tokenization.
/// Contract-oriented source linting.
/// Aeri module parsing.
/// Builtin and source type definitions.
/// UPLC lowering, validation, flat encoding, and CBOR emission.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use format_source;
pub use ;