Skip to main content

Crate helix_driver_native

Crate helix_driver_native 

Source
Expand description

§helix-driver-native

tokio shell + shared host storage/network implementations for helix-core ports.

§tokio::spawn 在此

helix-core 不含任何运行时依赖。tokio::spawn 在此 crate 的 engine_loop.rs, 不在 helix-core。

§错误翻译(ACL-2)

具体 I/O crate 错误在 driver/host 边界翻译为 helix_core::PortError, 不让具体类型穿透 port 边界。

Re-exports§

pub use bus_guard::guard_bus_envelope;
pub use bus_guard::is_emittable_channel;
pub use bus_guard::GuardedEnvelope;
pub use clock::NativeClock;
pub use engine_loop::run_engine_loop;
pub use engine_loop::run_engine_loop_stamped;
pub use engine_loop::run_engine_loop_with_transports;
pub use engine_loop::run_engine_loop_with_transports_and_trace;
pub use engine_loop::run_engine_loop_with_transports_and_trace_stamped;
pub use engine_loop::EngineConfig;
pub use engine_loop::TransportTable;
pub use event_sink::bus_event_name;
pub use event_sink::to_bus_envelope;
pub use event_sink::EventReceiver;
pub use event_sink::NativeEventSink;
pub use event_sink::RecvOutcome;
pub use event_sink::BUS_CHANNEL;
pub use http::configure_wdio_fail_next_post_create;
pub use http::NativeHttp;
pub use storage::NativeStorage;
pub use transport::NativeTransport;

Modules§

bus_guard
im:bus 信封守护(M2 Tauri 接缝① 横切约束)。
clock
NativeClock — SystemTime
engine_loop
engine_loop — native 薄壳(pump 核已下沉 helix-driver-host::engine)。
event_sink
NativeEventSink — tokio broadcast channel
http
Native HTTP thin shell over the shared host client.
storage
NativeStorage — PC/Tauri storage shell over the shared host storage.
transport
Native WebSocket thin shell over the shared host client.

Structs§

AuthTokenRegistry
driver 持有的真鉴权 token(平台壳登录后写入;core 永不触碰)。
HostNetworkConfig
Platform-provided network initialization material.
LifecycleContext
一次 Tick 的不可变 correlation 上下文。
LifecycleObservation
生命周期状态出口的结构化记录;不携带请求正文或用户数据。
LifecycleTraceSink
不参与业务正确性的有界 lifecycle 观测 sink。
LifecycleTraceStats
LifecycleTracker
engine 私有、有限容量的父 Tick 关联表。
SharedFileUploader
SharedHttpClient
Shared reqwest-backed HTTP port implementation.
TickIngressReceiver
TickIngressSender
生产 tick 入站发送端:时间戳、Tick 和可选 carrier 同在一个有界 mpsc 元素内。
TimerRegistry

Enums§

LifecycleCapability
可选端口能力;能力缺失只能报告 not_applicable,不能伪造网络 span。
LifecycleStage
lifecycle 的五个固定阶段;局部 HTTP/WS/Storage 效果均直接挂在 T1 根上。
LifecycleStatus
lifecycle 观测状态;Skipped 与 NotApplicable 明确区分未执行和不适用。

Constants§

LIFECYCLE_LINK_CAPACITY
父 Tick 关联表容量上限;超限仅淘汰诊断链接,不影响业务回灌。
LIFECYCLE_TRACE_QUEUE_CAPACITY
lifecycle 诊断出口的固定有界容量。

Functions§

rows_from_reply_bytes
Decode rows_to_reply_bytes output for driver compatibility paths.
rows_to_reply_bytes
Encode storage rows as the canonical JSON array used by PortReply.
tick_ingress_channel
tick_ingress_channel_observed
创建带 command admission 指标的生产 channel,容量与原背压点完全一致。

Type Aliases§

LifecycleState
LifecycleState 是状态合同的兼容别名,便于调用方按 state 语义读取。
TickId
每个 Tick 及其局部效果树使用的单调标识。