Module
ProtocPlugin.Main
- Package
- purescript-protobuf
- Repository
- xc-jp/purescript-protobuf
Entry point for the code-generating executable protoc
plugin. See the
package README for instructions on how to run the code generator.
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 with this command.
protoc --purescript_out=./src/ProtocPlugin google/protobuf/compiler/plugin.proto
See