Expand description
Execution engine for Venus notebooks.
Provides linear, parallel, and process-isolated cell execution with hot-reload support.
§Executors
LinearExecutor- In-process sequential execution. Fast but no isolation.ParallelExecutor- In-process parallel execution using Rayon.ProcessExecutor- Process-isolated execution. Cells run in worker processes that can be killed for true interruption. Provides crash isolation, memory isolation, and immediate cancellation.
§Architecture
§In-Process Execution (LinearExecutor, ParallelExecutor)
CompiledCell
│
└── LoadedCell (dylib loaded via libloading)
│
└── LinearExecutor / ParallelExecutor
│
└── FFI call → cell entry point
│
└── Output stored in StateManager§Process-Isolated Execution (ProcessExecutor)
ProcessExecutor (parent)
│
└── WorkerPool
│
└── WorkerHandle (manages child process)
│
├── IPC: LoadCell command
│ └── venus-worker loads dylib
│
├── IPC: Execute command
│ └── venus-worker calls FFI
│ └── Returns serialized output
│
└── SIGKILL for immediate interruption§Module Structure
context- Execution callbacks and cell contextexecutor- LinearExecutor for sequential executionffi- FFI types and dispatch macrosloaded_cell- LoadedCell wrapper for dylibsparallel- ParallelExecutor for concurrent executionprocess- ProcessExecutor for isolated executionreload- Hot-reload supportwindows_dll- Windows DLL hot-reload handler
Structs§
- Abort
Handle - Handle for cooperative cancellation of cell execution.
- Cell
Context - Execution context for a running cell.
- Executor
Kill Handle - Thread-safe handle for killing an executor’s current cell from another thread.
- HotReloader
- Manages hot reloading of cells.
- Linear
Executor - Linear executor that runs cells sequentially in dependency order.
- Loaded
Cell - A loaded cell library ready for execution.
- Parallel
Executor - Parallel executor that runs independent cells concurrently.
- Process
Executor - Process-based executor that runs cells in isolated worker processes.
- Windows
DllHandler - Handler for Windows DLL hot-reload.
Enums§
- Execution
Result - Result code from cell execution.
Traits§
- Execution
Callback - Callback trait for execution progress reporting.