Skip to main content

hara_native/
live_session.rs

1//! Backend-neutral live execution sessions.
2//!
3//! The interpreter and observed HBC machine keep their existing evaluator and
4//! evidence APIs. This module owns the common host-facing identity, lifecycle,
5//! capability, replacement, and stale-request contract and adapts each backend
6//! without treating a [`crate::Sandbox`] as an evaluator.
7
8#[path = "live_session/model.rs"]
9mod model;
10pub(crate) use model::required_text;
11pub use model::{
12    LiveBackend, LiveReplacementPolicy, LiveSession, LiveSessionCapabilities, LiveSessionCommand,
13    LiveSessionError, LiveSessionOperation, LiveSessionReply, LiveSessionRequest, LiveSessionState,
14    LiveSessionStatus, LiveSettlement, LiveSource, LIVE_SESSION_CAPABILITIES_SCHEMA,
15    LIVE_SESSION_PROTOCOL, LIVE_SESSION_REPLY_SCHEMA, LIVE_SESSION_STATE_SCHEMA,
16};
17
18#[path = "live_session/interpreter.rs"]
19mod interpreter;
20pub use interpreter::InterpreterLiveSession;
21
22#[path = "live_session/instrumented_interpreter.rs"]
23mod instrumented_interpreter;
24pub(crate) use instrumented_interpreter::InstrumentedInterpreterLiveSession;
25
26#[cfg(feature = "bytecode-observation")]
27#[path = "live_session/bytecode.rs"]
28mod bytecode;
29#[cfg(feature = "bytecode-observation")]
30pub use bytecode::BytecodeLiveSession;
31
32#[cfg(all(feature = "bytecode-observation", feature = "bytecode-instrumentation"))]
33#[path = "live_session/instrumented_hbc.rs"]
34mod instrumented_hbc;
35#[cfg(all(feature = "bytecode-observation", feature = "bytecode-instrumentation"))]
36pub(crate) use instrumented_hbc::InstrumentedHbcLiveSession;
37
38#[cfg(all(feature = "whole-wasm", not(target_arch = "wasm32")))]
39#[path = "live_session/whole_wasm.rs"]
40mod whole_wasm;
41#[cfg(all(feature = "whole-wasm", not(target_arch = "wasm32")))]
42pub(crate) use whole_wasm::WholeWasmLiveSession;
43
44#[cfg(test)]
45#[path = "live_session/tests.rs"]
46mod tests;