Join 4,000+ others and never miss out on new tips, tutorials, and more.
Latest version:
pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5
Open Swoole GRPC Compiler is a tool to generate stub code and compile GRPC .proto
for Open Swoole GRPC Server. 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