Skip to main content

Crate mesh_process

Crate mesh_process 

Source
Expand description

Infrastructure to create a multi-process mesh and spawn child processes within it.

Call Mesh::new() to create a process group. Workers launched on the mesh can run in child processes connected by the platform IPC transport (mesh_remote): Unix domain sockets on Linux, ALPC on Windows.

The child process receives an invitation via an environment variable and calls try_run_mesh_host() early in main() to join the mesh. Once joined, ports (and the resources they carry) flow transparently between parent and child.

This crate is used by OpenVMM to launch worker processes and by OpenHCL to run device emulators in isolated child processes.

Structs§

Connection
An active connection to a mesh listener.
Listener
A listener for incoming mesh connections.
Mesh
Represents a mesh::Node with the ability to spawn new processes that can communicate with any other process belonging to the same mesh.
ProcessConfig
Configuration for launching a new process in the mesh.

Traits§

SandboxProfile
Sandbox profile trait used for mesh hosts.

Functions§

connect
Connect to a mesh listener at path.
try_run_mesh_host
Runs a mesh host in the current thread, then exits the process, if this process was launched by Mesh::launch_host.