Skip to main content

Module context

Module context 

Source
Expand description

File-local context analysis.

aver context is inherently multi-file: a project’s context is the entry file and its dependency graph. This module provides the per-file building block. CLI wraps it with dependency traversal; the playground calls it for a single entry, so the returned FileContext has depends listed by name but no expanded child contexts — the caller is responsible for resolving them (or not).

Runtime-neutral: pure computation over parsed items and source text. No filesystem access, no VM, wasm-safe.

Structs§

ContextDecisionSummary
ContextFnSummary
ContextSummary
ContextTypeSummary
FileContext

Functions§

build_context_for_items
Build the per-file context record from parsed items and source text.
compute_memo_fns
Functions that qualify for auto-memoization: pure, recursive with branching, and all parameter types memo-safe.
is_memo_safe_type
render_context_md
Render a ContextSummary as markdown — same shape as the CLI’s aver context --md for a single-entry project. Playground uses this for the ⬇ Download as .md button so the browser and the CLI emit identical files for identical source.
summarize
Project a full FileContext into a serde-serializable summary.