Skip to main content

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;
19mod stdlib;
20#[cfg(feature = "df")]
21pub mod df;
22pub mod cli;
23pub mod examples;
24pub mod policy;
25pub mod handler;
26#[cfg(feature = "quic")]
27pub mod quic;
28pub mod ws;
29pub mod mcp_client;
30pub mod llm;
31
32pub use builtins::{call_pure_builtin, is_pure_call, is_pure_module, try_pure_builtin};
33pub use handler::{
34    ApprovalSink, CapturedSink, DefaultHandler, IoSink, NullApprovalSink, StdinApprovalSink,
35    StdoutSink,
36};
37pub use policy::{check_program, Policy, PolicyReport, PolicyViolation};
38pub use examples::evaluate_examples;