You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b01bbef
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -58,6 +58,9 @@ For macOS and Linux, add execute permission first:
58
58
chmod +x ./spc
59
59
```
60
60
61
+
> [!TIP]
62
+
> Before the first build, it is recommended to run `./spc doctor --auto-fix` to check and install the required build dependencies (spc will also remind you automatically when needed).
63
+
61
64
### 2. Build Static PHP
62
65
63
66
First, create a `craft.yml` file and specify which extensions you want to include from [extension list](https://static-php.dev/en/guide/extensions.html) or [command generator](https://static-php.dev/en/guide/cli-generator.html):
The current README contains basic usage. For the complete feature set of StaticPHP,
103
106
see <https://static-php.dev>.
104
107
108
+
If you are migrating from v2, check out the [migration guide](https://static-php.dev/en/guide/migrate-from-v2.html).
109
+
105
110
## Direct Download
106
111
107
-
If you do not want to build yet or just want to test first, you can download example pre-compiled artifacts from [Actions](https://github.com/static-php/hosted/actions/workflows/build-php-bulk.yml) or from a self-hosted server.
112
+
If you do not want to build yet or just want to test first, you can download example pre-compiled artifacts from [Actions](https://github.com/static-php/hosted/actions/workflows/v3-php-bin-unix.yml) ([Windows](https://github.com/static-php/hosted/actions/workflows/v3-php-bin-windows.yml)) or from a self-hosted server.
108
113
109
-
We offer 2 types of extension sets for each PHP version:
114
+
Below are several precompiled static-php binaries with different extension combinations,
115
+
which can be downloaded directly according to your needs.
110
116
111
-
-**gigantic**: Includes as many extensions as possible, the binary size is about 100-150MB.
112
-
-**base**: Only includes a few extensions used by StaticPHP itself, the binary size is about 10MB.
|[common](https://dl.static-php.dev/v3/php-bin/common/)|[37](https://dl.static-php.dev/v3/php-bin/common/README.txt)| Linux, macOS | The binary size is about 13MB |
120
+
|[bulk](https://dl.static-php.dev/v3/php-bin/bulk/)|[56](https://dl.static-php.dev/v3/php-bin/bulk/README.txt)| Linux, macOS | The binary size is about 30MB |
121
+
|[gnu-bulk](https://dl.static-php.dev/v3/php-bin/gnu-bulk/)|[56](https://dl.static-php.dev/v3/php-bin/gnu-bulk/README.txt)| Linux | Using shared glibc |
122
+
|[minimal](https://dl.static-php.dev/v3/php-bin/minimal/)|[7](https://dl.static-php.dev/v3/php-bin/minimal/README.txt)| Linux, macOS | The binary size is about 3MB |
123
+
|[spc-min](https://dl.static-php.dev/v3/php-bin/spc-min/)|[7](https://dl.static-php.dev/v3/php-bin/spc-min/README.txt)| Windows | The binary size is about 3MB |
124
+
|[spc-max](https://dl.static-php.dev/v3/php-bin/spc-max/)|[50](https://dl.static-php.dev/v3/php-bin/spc-max/README.txt)| Windows | The binary size is about 9MB |
113
125
114
-
> WIP
126
+
> Linux and Windows binaries are compressed with UPX, which can reduce the size of the binary by 30% to 50%.
127
+
> macOS does not support UPX compression, so the size of the pre-built binaries for macOS is larger.
115
128
116
129
### Build Online (using GitHub Actions)
117
130
@@ -120,8 +133,8 @@ you can use GitHub Actions to easily build a statically compiled PHP
120
133
while defining your own extension list.
121
134
122
135
1. Fork this repository.
123
-
2. Go to the Actions of the project and select `CI`.
124
-
3. Select `Run workflow`, fill in the PHP version you want to compile, the target type, and the list of extensions. (extensions comma separated, e.g. `bcmath,curl,mbstring`)
136
+
2. Go to the Actions of the project and select `CI on Unix` (or `CI on x86_64 Windows` for Windows builds).
137
+
3. Select `Run workflow`, fill in the target OS (`os`), the PHP version (`php-version`), and the list of extensions (`extensions`, comma separated, e.g. `bcmath,curl,mbstring`).
125
138
4. After waiting for the workflow to finish, open the corresponding run and download `Artifacts`.
126
139
127
140
If you enable `debug`, all logs will be output at build time, including compiled logs, for troubleshooting.
0 commit comments