Skip to main content

macroonz_compiler/
lib.rs

1//! A compiler that informs declared structure and seals every requested projection into one complete expansion.
2//!
3//! The crate README specifies the paved recipe contract, the raw callable extension road, what each generation step settles, and which semantic facts remain the caller's.
4//! Every home below carries its own README as its module documentation.
5//! The module list is a reading order: homes cite their semantic owners directly, including the request-owned door whose diagnostic projections are consumed by the diagnostic home, and the crate depends on nothing else in this workspace.
6
7#[cfg(feature = "host")]
8extern crate proc_macro;
9
10pub mod bounded;
11pub mod relation;
12pub mod identity;
13pub mod token;
14pub mod kind;
15pub mod origin;
16pub mod diagnostic;
17pub mod plan;
18pub mod render;
19pub mod closure;
20pub mod explanation;
21pub mod expansion;
22pub mod support;
23pub mod descriptor;
24pub mod codec;
25pub mod stamp;
26pub mod request;
27pub mod recipe;
28
29impl recipe::EvidenceCompiler for recipe::ConfiguredEvidence {
30    fn prepared(
31        capture: &CapturedInput,
32        recipe: &recipe::Recipe,
33        door: &Door,
34        replaced: &[recipe::RecipeRole],
35    ) -> Result<recipe::PreparedEvidence, Diagnostic> {
36        descriptor::recipe::prepared(capture, recipe, door, replaced)
37    }
38}
39
40#[cfg(feature = "host")]
41pub mod host;
42
43pub use bounded::{
44    Bounded, Capped, Capping, DuplicateKey, Empty, ForeignRosterReference, KeyedRoster,
45    KeyedRosterAssignment, KeyedRosterAssignmentError, KeyedRosterError, NonEmpty, NonEmptyError,
46    Overflow, UnassignedRosterMember,
47};
48pub use closure::{
49    CLOSURE_ISSUE_LIMIT, CarriedTokens, Closure, ClosureError, ClosureIssue, PartitionCargo,
50    PartitionedEmission,
51};
52pub use diagnostic::{
53    ASSEMBLY_FAMILY, BENCH_HELPER_FAMILY, BINDING_FAMILY, CAPTURE_FAMILY, CLOSURE_FAMILY,
54    CODEC_DECLARATION_FAMILY, CONCURRENCY_HELPER_FAMILY, DECLARATION_FAMILY, Diagnostic,
55    DiagnosticName, DiagnosticNameRefusal, EXPLANATION_FAMILY, FIRST_HELPER_FAMILY, Family, Line,
56    LineBody, LineSite, NETWORK_HELPER_FAMILY, Observed, PLANNING_FAMILY, Phase, Placement,
57    RELATED_ISSUE_LIMIT, RENDERING_FAMILY, REPAIR_LIMIT, RefusalClass, Refused, RelatedIdentity,
58    RelatedSet, RenderedMagnitude, Repair, Route, SECOND_HELPER_FAMILY, SHADOW_HELPER_FAMILY,
59    SHELL_FAMILY, SUPPORT_DECLARATION_FAMILY, Site, SiteCoordinate, composed,
60};
61pub use expansion::{Accounted, BINDING_FACT, BindError, Expansion};
62pub use explanation::{
63    ASSUMPTION_LIMIT, AnsweredOutput, DECLARED_QUESTION_LIMIT, EXPLANATION_ISSUE_LIMIT,
64    ExplanationError, ExplanationIssue, RELATED_KIND_LIMIT, RelatedDisposition,
65    UNIVERSAL_QUESTION_COUNT, UniversalAnswer, UniversalQuestion, View,
66};
67pub use identity::{
68    Anchoring, BUNDLE_PROFILE, CAPTURED_DECLARATION_PROFILE, CAPTURED_HELPER_PROFILE,
69    CLOSED_EXPANSION_PROFILE, CLOSURE_PROFILE, ClosedExpansionId, ClosureId,
70    DECLARATION_DOCUMENTATION_PROFILE, DECLARED_NAME_PROFILE, DIAGNOSTIC_RELATION_PROFILE,
71    EXPLANATION_PROFILE, ExplanationId, GENERATED_UNIT_PROFILE, GENERATOR,
72    GENERATOR_VERSION_PROFILE, GeneratorIdentity, HUMAN_TEXT_LIMIT, HumanProjection, Identity,
73    MACROONZ_STEM, ORIGIN_NODE_PROFILE, OwnerFact, OwnerIdentity, PLAN_PROFILE,
74    PROJECTION_CONTENT_PROFILE, PROJECTION_INTENT_PROFILE, PROJECTION_KIND_PROFILE, PlanId,
75    Profile, Provenance, RENDERED_UNIT_PROFILE, ShapeVersion, Subject, Transcript, Version,
76    encode_bytes, encode_length, names_are_separating,
77};
78pub use kind::{
79    Answer, CanonicalContent, Destination, Disposition, DispositionRecord, DispositionSet,
80    DispositionSetError, Kind, KindSet, NoQuestions, Question, Role, SoleRole,
81};
82pub use origin::{
83    DecisionTrace, Nonclaim, ORIGIN_EDGE_LIMIT, OriginEdge, OriginRelation, OriginTrail,
84    TRACE_ENTRY_LIMIT, TraceDecision, TraceEntry, TrailError,
85};
86pub use plan::{
87    Account, BoundAxis, ContentBinding, Context, ContradictionPair, DEPENDENCY_LIMIT,
88    DigestContract, Intent, InvalidationSet, InvalidationTrigger, MEMBERSHIP_LIMIT, Membership,
89    NONCLAIM_LIMIT, PLAN_ISSUE_LIMIT, Plan, PlanDecisions, PlanError, PlanIssue, PlannedMember,
90    PlannedOutput, TRIGGER_LIMIT,
91};
92pub use relation::{
93    AbsencePosture, CompletenessPosture, CompletenessStanding, CyclePosture, CycleStanding,
94    DensityPosture, DensityStanding, EmptyPosture, KeyedRosterRelation, KeyedRosterRows,
95    KeyedRosterRowsError, MembershipPosture, OccupancyStanding, Reachability, ReachabilityError,
96    RepeatedRelationPair, RepeatedRelationPairs, RepetitionPosture, RepetitionStanding,
97    RosterRelationStanding, RowOrder, SameRosterRequired, SelfRelationPosture,
98    SelfRelationStanding, StructuralMismatch, StructuralRequirement,
99};
100pub use render::{Output, RENDERED_BYTE_LIMIT, RenderError, RenderedProjection, RenderedUnit};
101pub use request::{
102    CrateBinding, Door, Producer, RUST_DECLARATION_PROFILE, Request, SELECTION_FACT, bound_content,
103};
104pub use token::{
105    AuthoredItem, AuthoredItemKind, AuthoredItemReadIssue, AuthoredItemReadRefusal,
106    CAPTURE_WORK_LIMIT, CAPTURED_TOKEN_LIMIT, CAPTURED_TREE_TOKEN_LIMIT, CaptureBound,
107    CaptureBuildRefusal, CaptureBuilder, CaptureCursor, CaptureExpectation, CaptureLevel,
108    CaptureReadIssue, CaptureReadRefusal, CaptureWalk, CapturedAtom, CapturedDelimiter,
109    CapturedFragment, CapturedInput, CapturedPayload, CapturedSpacing, CapturedTokenTree,
110    CoordinateRole, FragmentGenerationIssue, FragmentGenerationRefusal, GENERATED_TOKEN_LIMIT,
111    GeneratedDelimiter, GeneratedLiteral, GeneratedLiteralRefusal, GeneratedRowRefusal,
112    GeneratedSpacing, GeneratedToken, GeneratedTree, LiteralReadCause, SourceCoordinate,
113    SpanHandle, SpanResolutionRefusal, SpanTable, TEXT_SOURCE_BYTE_LIMIT, TOKEN_PATH_DEPTH_LIMIT,
114    TextCapture, TextLexicalCause, TextReadCause, TextReadRefusal, TokenPath, absolute_path,
115    and_all, associated_constant, associated_function, associated_type, attribute, bound_local,
116    bound_path, call, capture_literal, comma, comma_many, constant, consuming_receiver, decorated,
117    documentation, enumeration, equality, exclusive_receiver, function, function_item,
118    function_signature, generic_parameters, group, implementation, inline_module,
119    keyed_assignment_items, keyed_assignment_slice, keyed_roster_items, keyed_roster_slice,
120    match_arm, match_expression, metavariable, method_call, method_chain, named_field,
121    named_struct, named_variant, pinned_receiver, rendered_identifier, rendered_name, result_type,
122    roster, rust_keyword, shared_receiver, text_pair, trait_declaration, tuple_struct,
123    tuple_variant, twin_path, type_alias, typed_parameter, unit_struct, unit_variant, use_item,
124    where_clause,
125};