Module

ProtocPlugin.Main

Package
purescript-protobuf
Repository
xc-jp/purescript-protobuf

The funny thing about writing a protoc compiler plugin codec is that it bootstraps itself. We just have to write enough of the compiler plugin codec that it can handle the plugin.proto and descriptor.proto files, and then we call the compiler plugin on these .proto files and the compiler plugin codec generates the rest of itself.

Then we can delete the hand-written code and generate code to replace it.

spago build
protoc --purescript_out=./src/ProtocPlugin google/protobuf/compiler/plugin.proto

See

#NameSpace Source

type NameSpace = Array String

Names of parent messages for a message or enum.

#ScopedMsg Source

data ScopedMsg

A message descriptor, plus the names of all parent messages.

Constructors

#ScopedEnum Source

data ScopedEnum

An enum descriptor, plus the names of all parent messages.

Constructors

#ScopedField Source

data ScopedField

Scoped field name which has the qualified package namespace and the field name.

Constructors