Stub code generation and GRPC .proto
compiler for OpenSwoole GRPC. You can use the openswoole/protoc
docker images to compile and generate PHP codes or install the GRPC protoc plugin at your local environment.
Download package from releases page.
cp ./protoc-gen-openswoole-grpc /usr/local/bin/
protoc --php_out=./src \
--openswoole-grpc_out=./src helloworld.proto
# or
protoc --php_out=./src \
--openswoole-grpc_out=./src \
--plugin=protoc-gen-grpc=protoc-gen-openswoole-grpc \
helloworld.proto
docker run -v $APP_DIR:/app openswoole/protoc
OpenSwoole GRPC code generator is open-sourced software licensed under the Apache 2.0 license.