context

Function context 

Source
pub async fn context() -> GlobalContext
Expand description

Returns the process-global Monarch context, lazily initialized.

On first call, creates a singleton Host and bootstraps GlobalClientActor on its local_proc — symmetric with Python’s bootstrap_host(). Subsequent calls return immediately.

let cx = context().await;
cx.actor_instance    // c.f. Python: context().actor_instance

Python programs do not use this. Python has its own root client actor bootstrapped separately.