Skip to main content

Module wire

Module wire 

Source
Expand description

Between the platform and a parser process, over the process’s stdin and stdout: frames of a 4-byte big-endian length and that many bytes.

  • The process starts by sending a Hello, which the platform takes only if it is Hello::of_this_build with the published fingerprint.
  • Each request is a Request frame, then a frame of the statement.
  • Each answer is an Answer frame, and after Answer::Tree a frame of the tree’s canonical text.

Structs§

Hello
What a process greets with: the terms it was built to, and its parser’s identity, which it computes by parsing the probe corpus.
Request

Enums§

Answer

Constants§

MAX_CONTROL_FRAME
The most a Hello, Request or Answer frame holds.
PROTOCOL
The version of this exchange: its frames and messages, the bounds both sides apply and the tree’s canonical text. It changes whenever any of them does, so a platform never uses a process built to other terms.

Functions§

frame_len
The length a frame’s header announces, refused past max.
read_frame
The next frame, None at a clean end of input, and an error for a frame past max bytes, which is never read.
read_message
write_frame
write_message