Skip to main content

Module orchestration

Module orchestration 

Source
Expand description

callwire orchestration — zero-config multi-language process management.

§Two modes, selected automatically

Orchestrator mode (default, CALLWIRE_SPAWNED is unset):

  • Reads callwire.toml from the current directory.
  • Starts a dynamic registry on a random OS-assigned port.
  • Spawns declared worker services as child processes with:
    • CALLWIRE_SPAWNED=1
    • CALLWIRE_REGISTRY=127.0.0.1:<port>
  • Returns an OrchestratorGuard; dropping it kills all children.

Worker mode (CALLWIRE_SPAWNED=1):

  • Skips spawning.
  • Starts the local RPC server on a random OS port.
  • Connects to CALLWIRE_REGISTRY, registers all locally-exported functions.
  • Spawns an orphan-detection task that calls std::process::exit(0) if the parent process dies unexpectedly.

Structs§

OrchestratorGuard
Returned by init in orchestrator mode.
Dropping this value terminates all spawned worker processes.

Functions§

init
Initialise Callwire orchestration.