nichlink/lib.rs
1//! NichLink's registry protocol and runtime core.
2//! NichLink 的注册协议与运行期内核。
3//!
4//! The official address of a protocol noun is its module path
5//! (`nichlink::identity::NodeId`). The crate root re-exports the module hierarchy
6//! plus a curated vocabulary that host code, the build step and the runtime-check
7//! surfaces write as a bare name. The kernel's modules also glob into the root, so
8//! every other noun is *reachable* there as well; that is convenience, not a second
9//! contract, and only the curated names are promised as bare ones.
10//! 协议名词的官方地址就是它的模块路径(`nichlink::identity::NodeId`)。crate 根部重导出模块
11//! 层级,外加一份精选词汇——宿主代码、构建步骤与运行期校验面会以裸名书写它们。内核各模块也会
12//! 平铺 glob 到根部,因此其余名词同样**可以**在那里取得;那是便利,不是第二份契约,只有精选
13//! 清单上的名字被承诺为裸名可用。
14
15// The kernel is the crate every host links, so its public surface is the one that
16// has to be readable on docs.rs without leaving the page. The lint is on for the
17// whole crate rather than the roadmap's original per-module whitelist: the debt
18// was paid down in one pass, and a crate-wide lint is what keeps it from coming
19// back. `clippy -D warnings` turns every new undocumented public item into a
20// failure.
21// 内核是每个宿主都会链接的 crate,因此它的公开面正是必须在 docs.rs 上不必跳页就能读懂的那
22// 一份。lint 开在整个 crate 上,而不是路线图最初计划的逐模块白名单:这笔文档债已一次还清,
23// 而只有 crate 级别的 lint 才能防止它卷土重来。`clippy -D warnings` 会把每一个新增的、没有
24// 文档的公开项变成失败。
25#![warn(missing_docs)]
26
27#[path = "registry_core.rs"]
28pub mod registry_core;
29
30// The module hierarchy is the official surface.
31// 模块层级就是官方表面。
32#[cfg(feature = "syntax")]
33pub use registry_core::syntax;
34pub use registry_core::{
35 authoring, declaration, diagnostic, identity, json, lexicon, mir, plugin, release,
36 requirements, source, tree,
37};
38
39// Identity, registration and the contract/plugin records declarations carry.
40// 身份、注册,以及注册声明携带的合同与插件记录。
41pub use registry_core::{
42 Admission, ContractId, FlowContract, FrameworkId, NodeId, OwnedFlowContract, PartsContract,
43 PluginManifest, PluginMode, PluginSource, PresetContract, ROOT_NODE_ID, RegistrationInfo,
44 RegistrationRule, Registry, assert_contract, root_node_id, sha256_hex,
45};
46
47// Runtime-check and call-evidence nouns the tracing surfaces name directly.
48// 追踪面直接命名的运行期校验与调用证据名词。
49pub use registry_core::{
50 COORDINATES_IN_VIEWPORT, CallEdge, CallSite, Coordinates, EvidenceKind, FINITE_NUMBER,
51 LogicalCallEdge, NON_EMPTY_TEXT, Provenance, ProvenanceStep, RuntimeCheckFailure,
52 RuntimeCheckSpec, RuntimeValue, TraceMode,
53};
54
55// Build-side diagnostics and capability checks.
56// 构建侧诊断与能力检查。
57pub use registry_core::{
58 BuildDiagnostic, BuildDiagnostics, CapabilityDeclaration, CapabilityRequirement, StaticFace,
59 TopologyRecord, missing_capabilities, validate_face_topology,
60};