• Stars
    star
    119
  • Rank 297,002 (Top 6 %)
  • Language
    C
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

SWOOLE-CLI is a php binary distribution composed swoole & php-core & cli & fpm and mostly of common extensions.

swoole-cli

Swoole-Cli 是一个 PHP的二进制发行版,
集成了 swoolephp 内核php-cliphp-fpm以及多个常用扩展。
Swoole-Cli是全部静态编译打包的,不依赖任何操作系统的so 动态链接库,具备非常好的移植性,
可以在任意 Linux/macOS/Windows(CygWin)系统之间复制,下载即可使用。

作为 PHP 开发者都应该知道 PHP 有两种运行模式:php-fpm和php-cli,
那么在 Swoole 5.0 中将迎来一种新的运行模式:swoole-cli。
Swoole将像node.js这样作为独立程序提供给用户,而不是作为PHP的一个扩展。
除此之外swoole-cli会尽可能地对php-src进行裁剪,
移除一些不用的机制、模块、扩展、函数、类型、常量、代码,使得整个程序可以在几分钟之内编译完成。

相关文章

下载swoole-cli发行版

swoole-cli构建文档

Clone

git clone --recursive https://github.com/swoole/swoole-cli.git
git clone https://github.com/swoole/swoole-cli.git
git submodule update --init

生成构建脚本

composer install
php prepare.php
php prepare.php +inotify +mongodb -mysqli
  • 脚本会自动下载相关的C/C++库以及PECL扩展
  • 可使用+{ext}或者-{ext}增减扩展

进入 Docker Bash

./make.sh docker-bash

需要将 swoole-cli 的目录映射到容器的 /work 目录

构建 C/C++ 依赖库

./make.sh all-library

编译配置

./make.sh config

构建 swoole-cli

./make.sh build

编译成功后会生成bin/swoole-cli

打包

./make.sh archive

打包成功后会生成 swoole-cli-{version}-{os}-{arch}.tar.xz 压缩包,包含 swoole-cli 可执行文件、LICENSE 授权协议文件。

授权协议

  • swoole-cli 使用了多个其他开源项目,请认真阅读自动生成的 bin/LICENSE 文件中版权协议,遵守对应开源项目的 LICENSE
  • swoole-cli 本身的软件源代码、文档等内容以 Apache 2.0 LICENSE+SWOOLE-CLI LICENSE 作为双重授权协议,用户需要同时遵守 Apache 2.0 LICENSESWOOLE-CLI LICENSE 所规定的条款

SWOOLE-CLI LICENSE

  • swoole-cli 代码进行使用、修改、发布的新项目必须含有 SWOOLE-CLI LICENSE 的全部内容
  • 使用 swoole-cli 代码重新发布为新项目或者产品时,项目或产品名称不得包含 swoole 单词

More Repositories

1

swoole-src

🚀 Coroutine-based concurrency library for PHP
C++
18,406
star
2

phpx

💗 C++ wrapper for Zend API
C++
823
star
3

php-cp

pdo and redis tcp connect proxy
C
639
star
4

docker-swoole

🏄 Official Docker Image of Swoole
Dockerfile
499
star
5

ide-helper

📘 Swoole IDE Helper
PHP
469
star
6

yasd

Yet Another Swoole Debugger
PHP
356
star
7

swoole-wiki

📖Swoole全量Markdown文档, Swoole-Doc, Swoole-Wiki
Shell
270
star
8

phpkafka

PHP Kafka client is used in PHP-FPM and Swoole. PHP Kafka client supports 50 APIs, which might be one that supports the most message types ever.
PHP
266
star
9

awesome-swoole

💎 A curated list of awesome things related to Swoole.
230
star
10

library

📚 Swoole Library
PHP
221
star
11

grpc

💎 Grpc client based on Swoole Coroutine
PHP
199
star
12

ext-zookeeper

🧑 Coroutine-based ZooKeeper Client for PHP
C
150
star
13

community-chinese

Swoole 提案
117
star
14

thrift-rpc-server

Thrift RPC Server based on swoole
PHP
115
star
15

auto_reload

Inotify监控文件变更自动重启swoole_server
PHP
105
star
16

ext-serialize

the fastest serialize function bound for php7
C
93
star
17

ext-async

Asynchronous callback client
PHP
87
star
18

proxy-server

Full asynchronous proxy server can support over a large number of concurrent.
PHP
84
star
19

debugger

Swoole 远程调试器
PHP
79
star
20

ext-postgresql

🐘 Coroutine-based client for PostgreSQL
C++
64
star
21

swoole-docs

📗 Please check the latest version: https://www.swoole.co.uk/docs/
61
star
22

phpy

PHP
43
star
23

zmq

ZeroMQ bindings for Swoole
PHP
37
star
24

dashboard

Vue
22
star
25

php-docker

php docker file
Dockerfile
20
star
26

docs

PHP
10
star
27

benchmark

PHP
9
star
28

make-library

Convert PHP code to C/C++ header file
PHP
6
star
29

documents

2
star
30

swoole.github.io

Swoole's website, docs & blog mainly focused on the english-speaking community.
CSS
2
star
31

v4.4-lts

C++
1
star
32

golang-h2demo

Go
1
star