Chapter 05
The orchestration core.
Block uses a C# control plane to parse the program, prepare explicit runtime boundaries, manage native processes and carry compatible state through an ordered workflow.
System overview
The orchestrator owns the execution plan and process lifecycle. It does not reinterpret each embedded language. Instead, it dispatches a prepared stage to the corresponding native tool.
Execution lifecycle
Lex and parse
Read the source, identify native syntax and separate declared runtime blocks into an ordered plan.
Prepare context
Validate transferable names and encode compatible values for the destination runtime.
Launch process
Start the native interpreter or compiler and route standard input and output under engine control.
Collect and continue
Capture the stage result, update workflow state and move to the next declared block.
State transfer boundary
Cross-runtime values move through a deliberate preparation pipeline.
Applications should still validate untrusted input and follow the security guidance of every runtime and library involved.
Process isolation
Managed lifecycle
The orchestrator starts, observes and closes each child process as its stage runs.
Clear failure boundary
A runtime error is handled at the process boundary rather than becoming hidden shared state.
Observable output
Startup, transfer and completion information can remain visible to the operator.
Performance considerations
Block avoids a proprietary language virtual machine, but crossing a native process boundary still has a cost. Design stages around meaningful units of work instead of alternating runtimes for every small expression.
DOGroup related work inside one runtime stage.
DOTransfer compact, well-structured state.
AVOIDLaunching a runtime repeatedly for trivial operations.
MEASUREProfile the actual workflow and toolchain on its target machine.