iSCPv2のProtocolBuffer
-
npm ※ Typescriptの生成のみ
npm install @bufbuild/protobuf @bufbuild/protoc-gen-es @bufbuild/buf
-
go ※ gogoprotoの生成のみ
go install github.com/gogo/protobuf/protoc-gen-gogofast@v1.3.2 go run github.com/x-motemen/ghq@latest get github.com/gogo/protobuf/gogoproto
-
gitサブモジュールとして利用します
git submodule add https://github.com/aptpod/iscp-proto.git iscp-proto # or git submodule add git@github.com:aptpod/iscp-proto.git iscp-proto -
プロジェクトのルートに
buf.gen.yamlを作成します。iscp-proto/buf.gen.yamlまたはiscp-proto/buf.gen.gogoproto.yamlを参考に編集します。 -
コードを生成します。
# ソースコードの生成
buf generate iscp-proto/protogen ディレクトリに生成したコードは配置済みです。