lex_runtime/lib.rs
1//! M5: effect runtime + sandbox. See spec §7.4 and §8.5.
2//!
3//! What's here:
4//! - `policy::Policy` and `policy::check_program` — the static capability
5//! gate that walks declared effects and rejects programs whose effects
6//! are out of bounds before any code runs.
7//! - `handler::DefaultHandler` — the host-side effect handler that the VM
8//! dispatches `EFFECT_CALL` through.
9//!
10//! What's not here yet (deferred):
11//! - WASM-level isolation (`wasmtime` integration). The `--unsafe-no-sandbox`
12//! flag in the spec is operationally implicit for now: native execution
13//! only. We ship the policy/dispatch layer, which is the user-visible
14//! half of §7.4 and what the §7.6 acceptance tests exercise.
15
16pub mod arena;
17pub mod arrow;
18pub mod builtins;
19#[cfg(feature = "df")]
20pub mod df;
21pub mod cli;
22pub mod policy;
23pub mod handler;
24#[cfg(feature = "quic")]
25pub mod quic;
26pub mod ws;
27pub mod mcp_client;
28pub mod llm;
29
30pub use builtins::{call_pure_builtin, is_pure_call, is_pure_module, try_pure_builtin};
31pub use handler::{CapturedSink, DefaultHandler, IoSink, StdoutSink};
32pub use policy::{check_program, Policy, PolicyReport, PolicyViolation};