Harness provides a runtime for your services. It is partly generated by the protoc compiler and partly comes as a library:

  • Entrypoint (generated)

  • Input and output wires definition (generated)

  • Runtime library (installed)

Here is how service startup looks like:

  setup(config, wires-in) -> wires-out


  • entrypoint is an executable with a command-line options, which glues together your setup function, wire definitions and runtime library

  • your setup function accepts a single wires-in argument (input wires), configures and returns wires-out result (output wires)

  • runtime library starts output wires and waits for their completion


One of the goals for such design was to make it possible to thoroughly type-check your code starting from the entrypoint. This design makes it possible to statically check that your setup function accepts/returns concrete input/output wires.