nscn.polaris2.protoc.bridge.frontend

Members list

Type members

Classlikes

Frontend for macOS: a server socket plus a one-line nc script.

Frontend for macOS: a server socket plus a one-line nc script.

Named pipes are used on other Unix-likes but are unreliable on macOS (scalapb/protoc-bridge#366), and nc is always present there.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Platform-specific plumbing that lets protoc talk to a generator inside this JVM.

Platform-specific plumbing that lets protoc talk to a generator inside this JVM.

protoc only knows how to launch executables that read a CodeGeneratorRequest from stdin and write a CodeGeneratorResponse to stdout. A frontend therefore fabricates a tiny executable whose only job is to forward those two streams into this process:

  1. protoc writes the request to the plugin's stdin
  2. the plugin forwards it over a pipe or socket
  3. this JVM reads it, runs the generator
  4. this JVM writes the response back over the channel and closes it
  5. the plugin copies that to its stdout, where protoc picks it up

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Frontend for Unix-likes other than macOS.

Frontend for Unix-likes other than macOS.

Uses a pair of FIFOs and a two-line shell script. Preferred over the socket frontend because it needs nothing beyond mkfifo and cat, which some minimal Linux images do not have an nc for.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
abstract class SocketBasedPluginFrontend extends PluginFrontend

Shared frontend for platforms where a loopback socket beats a FIFO.

Shared frontend for platforms where a loopback socket beats a FIFO.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Frontend for Windows: a server socket plus a .bat that starts BridgeApp.

Frontend for Windows: a server socket plus a .bat that starts BridgeApp.

Windows has neither FIFOs nor a guaranteed nc, so the forwarder is a second JVM launched from the same java.home with only this jar on its classpath.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type