Skip to main content

Crate ara_core

Crate ara_core 

Source
Expand description

ara-core: the shared core of the ARA viewer runtime.

This crate holds all parsing, normalization, binding resolution, and DAG layout for the ARA viewer. It is compiled to both native targets (used by ara-cli) and wasm32-unknown-unknown (used by the browser client), so it is the single source of truth that keeps the server and client from drifting.

See https://github.com/ARA-Labs/ara-cli.

Re-exports§

pub use layout::LayoutOptions;
pub use layout::LayoutResult;
pub use layout::NodePosition;
pub use layout::Point;
pub use layout::Rect;
pub use manifest::Binding;
pub use manifest::BindingRole;
pub use manifest::BuiltOn;
pub use manifest::Claim;
pub use manifest::ClaimId;
pub use manifest::Concept;
pub use manifest::Exhibit;
pub use manifest::ExhibitKind;
pub use manifest::LinkKind;
pub use manifest::Manifest;
pub use manifest::Node;
pub use manifest::NodeExhibit;
pub use manifest::NodeFields;
pub use manifest::NodeId;
pub use manifest::NodeKind;
pub use manifest::PaperMeta;
pub use manifest::Problem;
pub use manifest::Recipe;
pub use manifest::RelatedWork;
pub use report::Diagnostic;
pub use report::ParseReport;
pub use report::Severity;
pub use lint::FixCandidate;
pub use lint::LintDiagnostic;
pub use lint::LintFile;
pub use lint::LintReport;
pub use lint::LintRuleId;
pub use lint::check_dir;
pub use lint::check_sources;

Modules§

layout
Deterministic layered DAG layout (Sugiyama method) for Manifest.
lint
Format-lint layer: detects canonicalizable drift in an ARA artifact’s raw source text and emits diagnostics paired with data-only fix candidates.
manifest
Normalized wire types — the single manifest every downstream consumer reads.
report
Diagnostics produced by parsing/validation.

Structs§

AppliedFix
A fix that was applied to a source file.
FixOutcome
The outcome of a fix_dir pass.
SkippedFix
A fixable drift that was detected but deliberately not applied, because the safety guard rejected the edit (or it could not be rendered).

Functions§

fix_dir
Detects fixable drift in the ARA artifact at dir, applies the safe fixes to trace/exploration_tree.yaml / logic/claims.md in place, and returns a FixOutcome. Native only.
parse_and_layout
Parses and lays out an in-memory ARA artifact.
parse_and_layout_dir
Reads, parses, and lays out an ARA artifact directory. Native only.
parse_dir
Reads trace/exploration_tree.yaml (required) and logic/claims.md (optional) from dir and normalizes them, then augments the manifest with the optional logic-section files (PAPER.md, logic/problem.md, logic/concepts.md, logic/related_work.md, logic/solution/*.md). An absent section file is silently skipped; a present-but-malformed one adds a warning without failing the parse. Native only.
parse_sources
Parses in-memory sources into a Manifest. Pure and wasm-safe.
version
Returns the version of ara-core, taken from the crate manifest.