1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! # outl-exec
//!
//! Engine that runs the code inside a fenced markdown block (` ```lisp `,
//! ` ```python `, ...) and writes the result back into the page as a
//! sibling subblock — idempotent on re-run.
//!
//! The crate is intentionally tiny and modular:
//!
//! - [`runtime::Runtime`] — the only trait you implement to add a new
//! language. Everything else (registry, orchestration, result block
//! upkeep) treats runtimes as opaque.
//! - [`registry::RuntimeRegistry`] — resolves a fence info-string
//! (`"lisp"`, `"python"`, ...) to the concrete [`runtime::Runtime`].
//! - [`sandbox`] — cross-platform timeout helper. Runtimes that need
//! stronger isolation (memory, syscalls) layer it on top — the
//! wasmtime-based runtimes coming in M2 will, the in-process ones
//! today don't.
//! - [`result_block`] — pure functions that find / create the result
//! subblock under a code block. No I/O.
//! - [`orchestrate::run_block_at_index`] — single entry point for every
//! UI (TUI, future Tauri GUI, future mobile via uniffi). Takes a
//! workspace + page path + block flat-index, runs, persists,
//! reconciles.
//!
//! ## Adding a new language in 10 lines
//!
//! ```ignore
//! struct RubyRuntime;
//! impl outl_exec::Runtime for RubyRuntime {
//! fn language(&self) -> &'static str { "ruby" }
//! fn execute(&self, source: &str, ctx: &outl_exec::ExecContext)
//! -> Result<outl_exec::ExecOutput, outl_exec::ExecError>
//! {
//! // run the source however you like (wasm, subprocess, ...);
//! // populate stdout/stderr/duration/exit and return.
//! todo!()
//! }
//! }
//!
//! let mut reg = outl_exec::RuntimeRegistry::default();
//! reg.register(RubyRuntime);
//! ```
pub use ;
pub use ;
pub use RuntimeRegistry;
pub use ;
pub use ;
pub use ;