Mac
brew install protobuf
protoc --version # Ensure compiler version is 3+
Windows
winget install protobuf
protoc --version # Ensure compiler version is 3+
Linux
apt install -y protobuf-compiler
protoc --version # Ensure compiler version is 3+
Format
protoc \
--plugin=protoc-gen-webviewrpc=<path to protoc-gen-webviewrpc> \
--webviewrpc_out=<generating options>:<output directory> \
-I. <proto file>
Javascript
npx pbjs HelloWorld.proto --es6 hello_world.js
CSharp
protoc --csharp_out=. HelloWorld.proto
protoc \
--plugin=protoc-gen-webviewrpc=./protoc-gen-webviewrpc \
--webviewrpc_out=cs_server:./OutCSharp \
-I. my_service.proto
protoc \
--plugin=protoc-gen-webviewrpc=./protoc-gen-webviewrpc \
--webviewrpc_out=cs_client:./OutCSharp \
-I. my_service.proto
protoc \
--plugin=protoc-gen-webviewrpc=./protoc-gen-webviewrpc \
--webviewrpc_out=js_server:./OutJavaScript \
-I. my_service.proto
protoc \
--plugin=protoc-gen-webviewrpc=./protoc-gen-webviewrpc \
--webviewrpc_out=js_client:./OutJavaScript \
-I. my_service.proto
protoc \
--plugin=protoc-gen-webviewrpc=./protoc-gen-webviewrpc \
--webviewrpc_out=cs_client,cs_server,js_client,js_server:./All \
-I. my_service.proto