Overview of monty-proto wire protocol
mainThe monty-proto crate defines the Protobuf-based wire protocol used to connect Monty worker processes to their parent drivers. This protocol allows parents and children to communicate over framed stdio or WebSockets. Because it uses Protobuf instead of Monty's internal postcard format, implementations can be written in any language.
Key characteristics:
- Isolation: Designed for a subprocess architecture where a parent (like
monty-pool) drives children. If a child crashes due to memory errors, the parent can simply replace it. - Security: The protocol is designed with untrusted children in mind. Conversions from proto to Rust are fallible, and decoding enforces depth and size budgets to prevent exploitation of malformed data.
- Version Lockstep: The protocol does not support in-band negotiation. The parent and child must be deployed in lockstep using the
MONTY_VERSIONconstant to ensure compatibility.