Skip to main content

Crate harn_modules

Crate harn_modules 

Source

Modules§

asset_paths
Package-root prompt asset addressing (issue #742).
fingerprint
Interface fingerprints — a stable hash of a module’s public surface.
host_capabilities
Shared checks for declared and served host operations.
host_capability_config
Project settings for declared and served host operations.
manifest_walk
The single upward “where does my project start” walk for every Harn frontend.
package_execution
package_snapshot
personas
project_config
Typed project configuration shared by Harn’s CLI and language tooling.

Structs§

DefSite
A resolved definition site within a module.
ImportCompileFailure
A consumer import whose resolved target module failed to compile. Reported by ModuleGraph::import_compile_failures.
ModuleGraph
Parsed information for a set of module files.
ModuleGraphBuild
ModuleImport
Public import edge summary for static module graph consumers.
ModuleLoadError
A lex/parse failure captured while loading a module into the graph.
ModuleSymbolDemand
NamespaceImportInfo
One import * as alias from "..." binding visible from a consumer file.
NamespaceMemberSignature
A namespace member’s signature with defining-module aliases inlined.
PackageImport
A package-shaped import together with the module that declares it.
ParsedModuleSource
PublicDeclaration
One public name introduced by a single top-level declaration.
ReExportConflict
A duplicate or ambiguous re-export inside a single module. Reported by ModuleGraph::re_export_conflicts.
RefSite
One use of a name that resolved to a DefSite.
ReferenceEdge
One resolution-backed reference edge: a use site and the definition it resolved to.
ReferenceIndex
Resolution-backed reference index for a built module graph.
SelectiveImportIssue
A selective import rejected by the target module’s public surface.
SymbolReachability

Enums§

DefKind
Kind of symbol that can be exported by a module.
ExportDemand
SelectiveImportIssueKind
Why a selective import cannot cross the target module’s export boundary.
WildcardResolution
Wildcard import resolution status for a single importing module.

Constants§

MODULE_GRAPH_JOBS_ENV
Environment override for the graph-build worker-pool size. 1 forces the serial walk; unset defaults to the machine’s available parallelism.

Functions§

build
Build a module graph from a set of files.
build_closed_program
Build a closed module graph while retaining every reachable parsed source.
build_for_reference_index
Build a module graph that retains every reachable AST and honors unsaved buffer overrides.
build_with_module_projection
Project each readable module before its source and syntax tree are dropped.
build_with_parsed_sources
Build a module graph while retaining parsed sources for the seed files.
build_with_source
Build a module graph using caller-owned source for one root file.
build_with_sources
Build a module graph for one root file using caller-owned source for any module in sources, such as an editor’s unsaved buffers. Modules without an entry resolve from their filesystem or embedded stdlib locations.
build_with_standalone_source
Build a module graph using caller-owned source without discovering package metadata around the entry file.
canonical_path
Canonicalize path, memoized process-wide.
closed_program_reachability
Resolve export demand across a closed graph to a monotone fixpoint.
index_references
Walk sources and record every identifier that ModuleGraph::definition_of can resolve.
module_source_disk_reads
How many module sources this thread has read from disk while building module graphs. Embedded stdlib modules and caller-supplied sources are not disk reads.
public_declarations
Return every public name introduced by one declaration.
read_module_source
Return the source for a resolved module path.
resolve_import_path
Resolve an import string relative to the importing file.
resolve_import_path_with_guard
resolve_import_path_with_snapshot
sibling_declarations
Names explicitly shared with modules in the declaring file’s directory. This projection stays separate from the public surface used by package catalogs and external importers.
sibling_directory_access
Runtime projection when the importer directory is already known.
sibling_module_access
A sibling export may cross exactly one resolved module-directory seam.
stdlib_catalog
The installed stdlib catalog. Reading the stdlib without one is a host bug, so it panics with the typed reason instead of acting as if the standard library were empty.
stdlib_module_name
Extract the stdlib module name when path is a <std>/<name> virtual path, otherwise None.
try_stdlib_catalog
The installed stdlib catalog, or the typed reason there is none.
unresolved_package_alias
The package alias a failed import names, when only an installed package could ever have resolved it.