deploy: 1bc7bc3421eed0ad1cf37a9da71a7ab62b3206ec

This commit is contained in:
crazywhalecc 2024-12-13 07:06:19 +00:00
parent b6519daf03
commit 672cd20340
57 changed files with 236 additions and 108 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{C as e}from"./chunks/CliGenerator.gfGtDGTf.js";import{d as t,c as a,I as o,a1 as n,o as r}from"./chunks/framework.gjrnbxUT.js";const i=n('<h1 id="cli-build-command-generator" tabindex="-1">CLI Build Command Generator <a class="header-anchor" href="#cli-build-command-generator" aria-label="Permalink to &quot;CLI Build Command Generator&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>The extensions selected below may contain extensions that are not supported by the selected operating system, which may cause compilation to fail. Please check <a href="./extensions.html">Supported Extensions</a> first.</p></div>',2),u=JSON.parse('{"title":"CLI Build Command Generator","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/guide/cli-generator.md","filePath":"en/guide/cli-generator.md"}'),s={name:"en/guide/cli-generator.md"},h=t({...s,setup(c){return(l,d)=>(r(),a("div",null,[i,o(e,{lang:"en"})]))}});export{u as __pageData,h as default}; import{C as e}from"./chunks/CliGenerator.qklIY23U.js";import{d as t,c as a,I as o,a1 as n,o as r}from"./chunks/framework.gjrnbxUT.js";const i=n('<h1 id="cli-build-command-generator" tabindex="-1">CLI Build Command Generator <a class="header-anchor" href="#cli-build-command-generator" aria-label="Permalink to &quot;CLI Build Command Generator&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>The extensions selected below may contain extensions that are not supported by the selected operating system, which may cause compilation to fail. Please check <a href="./extensions.html">Supported Extensions</a> first.</p></div>',2),u=JSON.parse('{"title":"CLI Build Command Generator","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/guide/cli-generator.md","filePath":"en/guide/cli-generator.md"}'),s={name:"en/guide/cli-generator.md"},h=t({...s,setup(c){return(l,d)=>(r(),a("div",null,[i,o(e,{lang:"en"})]))}});export{u as __pageData,h as default};

View File

@ -1 +1 @@
import{C as e}from"./chunks/CliGenerator.gfGtDGTf.js";import{d as t,c as a,I as o,a1 as n,o as r}from"./chunks/framework.gjrnbxUT.js";const i=n('<h1 id="cli-build-command-generator" tabindex="-1">CLI Build Command Generator <a class="header-anchor" href="#cli-build-command-generator" aria-label="Permalink to &quot;CLI Build Command Generator&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>The extensions selected below may contain extensions that are not supported by the selected operating system, which may cause compilation to fail. Please check <a href="./extensions.html">Supported Extensions</a> first.</p></div>',2),u=JSON.parse('{"title":"CLI Build Command Generator","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/guide/cli-generator.md","filePath":"en/guide/cli-generator.md"}'),s={name:"en/guide/cli-generator.md"},h=t({...s,setup(c){return(l,d)=>(r(),a("div",null,[i,o(e,{lang:"en"})]))}});export{u as __pageData,h as default}; import{C as e}from"./chunks/CliGenerator.qklIY23U.js";import{d as t,c as a,I as o,a1 as n,o as r}from"./chunks/framework.gjrnbxUT.js";const i=n('<h1 id="cli-build-command-generator" tabindex="-1">CLI Build Command Generator <a class="header-anchor" href="#cli-build-command-generator" aria-label="Permalink to &quot;CLI Build Command Generator&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>The extensions selected below may contain extensions that are not supported by the selected operating system, which may cause compilation to fail. Please check <a href="./extensions.html">Supported Extensions</a> first.</p></div>',2),u=JSON.parse('{"title":"CLI Build Command Generator","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/guide/cli-generator.md","filePath":"en/guide/cli-generator.md"}'),s={name:"en/guide/cli-generator.md"},h=t({...s,setup(c){return(l,d)=>(r(),a("div",null,[i,o(e,{lang:"en"})]))}});export{u as __pageData,h as default};

View File

@ -1 +0,0 @@
import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"Build (Linux, macOS, FreeBSD)","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/manual-build.md","filePath":"en/guide/manual-build.md"}'),n={name:"en/guide/manual-build.md"},t=a("",107),l=[t];function o(p,h,d,c,r,k){return e(),i("div",null,l)}const m=s(n,[["render",o]]);export{g as __pageData,m as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"Build (Linux, macOS, FreeBSD)","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/manual-build.md","filePath":"en/guide/manual-build.md"}'),n={name:"en/guide/manual-build.md"},t=a(`<h1 id="build-linux-macos-freebsd" tabindex="-1">Build (Linux, macOS, FreeBSD) <a class="header-anchor" href="#build-linux-macos-freebsd" aria-label="Permalink to &quot;Build (Linux, macOS, FreeBSD)&quot;"></a></h1><p>This section covers the build process for Linux, macOS, and FreeBSD. If you want to build on Windows, also need to read <a href="./build-on-windows.html">Build on Windows</a>.</p><h3 id="build-locally-using-spc-binary-recommended" tabindex="-1">Build locally (using SPC binary) (recommended) <a class="header-anchor" href="#build-locally-using-spc-binary-recommended" aria-label="Permalink to &quot;Build locally (using SPC binary) (recommended)&quot;"></a></h3><p>This project provides a binary file of static-php-cli. You can directly download the binary file of the corresponding platform and then use it to build static PHP. Currently, the platforms supported by <code>spc</code> binary are Linux and macOS.</p><p>Here&#39;s how to download from self-hosted server:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Download from self-hosted nightly builds (sync with main branch)</span></span> import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"Build (Linux, macOS, FreeBSD)","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/manual-build.md","filePath":"en/guide/manual-build.md"}'),n={name:"en/guide/manual-build.md"},t=a(`<h1 id="build-linux-macos-freebsd" tabindex="-1">Build (Linux, macOS, FreeBSD) <a class="header-anchor" href="#build-linux-macos-freebsd" aria-label="Permalink to &quot;Build (Linux, macOS, FreeBSD)&quot;"></a></h1><p>This section covers the build process for Linux, macOS, and FreeBSD. If you want to build on Windows, also need to read <a href="./build-on-windows.html">Build on Windows</a>.</p><h3 id="build-locally-using-spc-binary-recommended" tabindex="-1">Build locally (using SPC binary) (recommended) <a class="header-anchor" href="#build-locally-using-spc-binary-recommended" aria-label="Permalink to &quot;Build locally (using SPC binary) (recommended)&quot;"></a></h3><p>This project provides a binary file of static-php-cli. You can directly download the binary file of the corresponding platform and then use it to build static PHP. Currently, the platforms supported by <code>spc</code> binary are Linux and macOS.</p><p>Here&#39;s how to download from self-hosted server:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Download from self-hosted nightly builds (sync with main branch)</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># For Linux x86_64</span></span> <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># For Linux x86_64</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -fsSL</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64</span></span> <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -fsSL</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># For Linux aarch64</span></span> <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># For Linux aarch64</span></span>
@ -144,4 +144,36 @@ import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.gjrnbxUT.js";const g
<span class="line"><span>Loaded Configuration File =&gt; /Users/jerry/project/git-project/static-php-cli/php.ini</span></span> <span class="line"><span>Loaded Configuration File =&gt; /Users/jerry/project/git-project/static-php-cli/php.ini</span></span>
<span class="line"><span></span></span> <span class="line"><span></span></span>
<span class="line"><span>$ buildroot/bin/php -i | grep memory</span></span> <span class="line"><span>$ buildroot/bin/php -i | grep memory</span></span>
<span class="line"><span>memory_limit =&gt; 8G =&gt; 8G</span></span></code></pre></div><p>For the objects, methods and interfaces supported by static-php-cli, you can read the source code. Most methods and objects have corresponding comments.</p><p>Commonly used objects and functions using the <code>-P</code> function are:</p><ul><li><code>SPC\\store\\FileSystem</code>: file management class <ul><li><code>::replaceFileStr(string $filename, string $search, $replace)</code>: Replace file string content</li><li><code>::replaceFileStr(string $filename, string $pattern, $replace)</code>: Regularly replace file content</li><li><code>::replaceFileUser(string $filename, $callback)</code>: User-defined function replaces file content</li><li><code>::copyDir(string $from, string $to)</code>: Recursively copy a directory to another location</li><li><code>::convertPath(string $path)</code>: Convert the path delimiter to the current system delimiter</li><li><code>::scanDirFiles(string $dir, bool $recursive = true, bool|string $relative = false, bool $include_dir = false)</code>: Traverse directory files</li></ul></li><li><code>SPC\\builder\\BuilderBase</code>: Build object <ul><li><code>-&gt;getPatchPoint()</code>: Get the current injection point name</li><li><code>-&gt;getOption(string $key, $default = null)</code>: Get command line and compile-time options</li><li><code>-&gt;getPHPVersionID()</code>: Get the currently compiled PHP version ID</li><li><code>-&gt;getPHPVersion()</code>: Get the currently compiled PHP version number</li><li><code>-&gt;setOption(string $key, $value)</code>: Set options</li><li><code>-&gt;setOptionIfNotExists(string $key, $value)</code>: Set option if option does not exist</li></ul></li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>static-php-cli has many open methods, which cannot be listed in the docs, but as long as it is a <code>public function</code> and is not marked as <code>@internal</code>, it theoretically can be called.</p></div><h2 id="multiple-builds" tabindex="-1">Multiple builds <a class="header-anchor" href="#multiple-builds" aria-label="Permalink to &quot;Multiple builds&quot;"></a></h2><p>If you need to build multiple times locally, the following method can save you time downloading resources and compiling.</p><ul><li>If you only switch the PHP version without changing the dependent libraries, you can use <code>bin/spc switch-php-version</code> to quickly switch the PHP version, and then re-run the same <code>build</code> command.</li><li>If you want to rebuild once, but do not re-download the source code, you can first <code>rm -rf buildroot source</code> to delete the compilation directory and source code directory, and then rebuild.</li><li>If you want to update a version of a dependency, you can use <code>bin/spc del-download &lt;source-name&gt;</code> to delete the specified source code, and then use <code>download &lt;source-name&gt;</code> to download it again.</li><li>If you want to update all dependent versions, you can use <code>bin/spc download --clean</code> to delete all downloaded sources, and then download them again.</li></ul>`,107),l=[t];function o(p,h,d,c,r,k){return e(),i("div",null,l)}const m=s(n,[["render",o]]);export{g as __pageData,m as default}; <span class="line"><span>memory_limit =&gt; 8G =&gt; 8G</span></span></code></pre></div><p>For the objects, methods and interfaces supported by static-php-cli, you can read the source code. Most methods and objects have corresponding comments.</p><p>Commonly used objects and functions using the <code>-P</code> function are:</p><ul><li><code>SPC\\store\\FileSystem</code>: file management class <ul><li><code>::replaceFileStr(string $filename, string $search, $replace)</code>: Replace file string content</li><li><code>::replaceFileStr(string $filename, string $pattern, $replace)</code>: Regularly replace file content</li><li><code>::replaceFileUser(string $filename, $callback)</code>: User-defined function replaces file content</li><li><code>::copyDir(string $from, string $to)</code>: Recursively copy a directory to another location</li><li><code>::convertPath(string $path)</code>: Convert the path delimiter to the current system delimiter</li><li><code>::scanDirFiles(string $dir, bool $recursive = true, bool|string $relative = false, bool $include_dir = false)</code>: Traverse directory files</li></ul></li><li><code>SPC\\builder\\BuilderBase</code>: Build object <ul><li><code>-&gt;getPatchPoint()</code>: Get the current injection point name</li><li><code>-&gt;getOption(string $key, $default = null)</code>: Get command line and compile-time options</li><li><code>-&gt;getPHPVersionID()</code>: Get the currently compiled PHP version ID</li><li><code>-&gt;getPHPVersion()</code>: Get the currently compiled PHP version number</li><li><code>-&gt;setOption(string $key, $value)</code>: Set options</li><li><code>-&gt;setOptionIfNotExists(string $key, $value)</code>: Set option if option does not exist</li></ul></li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>static-php-cli has many open methods, which cannot be listed in the docs, but as long as it is a <code>public function</code> and is not marked as <code>@internal</code>, it theoretically can be called.</p></div><h2 id="multiple-builds" tabindex="-1">Multiple builds <a class="header-anchor" href="#multiple-builds" aria-label="Permalink to &quot;Multiple builds&quot;"></a></h2><p>If you need to build multiple times locally, the following method can save you time downloading resources and compiling.</p><ul><li>If you only switch the PHP version without changing the dependent libraries, you can use <code>bin/spc switch-php-version</code> to quickly switch the PHP version, and then re-run the same <code>build</code> command.</li><li>If you want to rebuild once, but do not re-download the source code, you can first <code>rm -rf buildroot source</code> to delete the compilation directory and source code directory, and then rebuild.</li><li>If you want to update a version of a dependency, you can use <code>bin/spc del-download &lt;source-name&gt;</code> to delete the specified source code, and then use <code>download &lt;source-name&gt;</code> to download it again.</li><li>If you want to update all dependent versions, you can use <code>bin/spc download --clean</code> to delete all downloaded sources, and then download them again.</li></ul><h2 id="embed-usage" tabindex="-1">embed usage <a class="header-anchor" href="#embed-usage" aria-label="Permalink to &quot;embed usage&quot;"></a></h2><p>If you want to embed static-php into other C language programs, you can use <code>--build-embed</code> to build an embed version of PHP.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> {your</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> extensions}</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-embed</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --debug</span></span></code></pre></div><p>Under normal circumstances, PHP embed will generate <code>php-config</code> after compilation. For static-php, we provide <code>spc-config</code> to obtain the parameters during compilation. In addition, when using embed SAPI (libphp.a), you need to use the same compiler as libphp, otherwise there will be a link error.</p><p>Here is the basic usage of spc-config:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># output all flags and options</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> curl,zlib,phar,openssl</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># output libs</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> curl,zlib,phar,openssl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --libs</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># output includes</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> curl,zlib,phar,openssl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --includes</span></span></code></pre></div><p>By default, static-php uses the following compilers on different systems:</p><ul><li>macOS: <code>clang</code></li><li>Linux (Alpine Linux): <code>gcc</code></li><li>Linux (glibc based distros, x86_64): <code>/usr/local/musl/bin/x86_64-linux-musl-gcc</code></li><li>Linux (glibc based distros, aarch64): <code>/usr/local/musl/bin/aarch64-linux-musl-gcc</code></li><li>FreeBSD: <code>clang</code></li></ul><p>Here is an example of using embed SAPI:</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// embed.c</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">#include</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &lt;sapi/embed/php_embed.h&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">int</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> main</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">int</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> argc</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">char</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> **</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">argv</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">){</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PHP_EMBED_START_BLOCK</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(argc,argv)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> zend_file_handle file_handle;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> zend_stream_init_filename</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&amp;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">file_handle,</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;embed.php&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">php_execute_script</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&amp;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">file_handle) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> FAILURE){</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> php_printf</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Failed to execute PHP script.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PHP_EMBED_END_BLOCK</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><div class="language-php vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">php</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;?</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">php</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// embed.php</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Hello world!</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span></code></pre></div><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># compile in debian/ubuntu x86_64</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">/usr/local/musl/bin/x86_64-linux-musl-gcc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> embed.c</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> $(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bcmath,zlib</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">-static</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> embed</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># compile in macOS/FreeBSD</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">clang</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> embed.c</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> $(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bcmath,zlib</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">-o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> embed</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./embed</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># out: Hello world!</span></span></code></pre></div>`,119),l=[t];function p(o,h,d,c,r,k){return e(),i("div",null,l)}const F=s(n,[["render",p]]);export{u as __pageData,F as default};

View File

@ -0,0 +1 @@
import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"Build (Linux, macOS, FreeBSD)","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/manual-build.md","filePath":"en/guide/manual-build.md"}'),n={name:"en/guide/manual-build.md"},t=a("",119),l=[t];function p(o,h,d,c,r,k){return e(),i("div",null,l)}const F=s(n,[["render",p]]);export{u as __pageData,F as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{C as e}from"./chunks/CliGenerator.gfGtDGTf.js";import{d as a,c as t,I as o,a1 as r,o as i}from"./chunks/framework.gjrnbxUT.js";const s=r('<h1 id="cli-编译命令生成器" tabindex="-1">CLI 编译命令生成器 <a class="header-anchor" href="#cli-编译命令生成器" aria-label="Permalink to &quot;CLI 编译命令生成器&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>下面选择扩展可能包含所选操作系统不支持的扩展,这可能导致编译失败。请先查阅 <a href="./extensions.html">支持的扩展</a>。</p></div>',2),p=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),c={name:"zh/guide/cli-generator.md"},_=a({...c,setup(l){return(n,d)=>(i(),t("div",null,[s,o(e,{lang:"zh"})]))}});export{p as __pageData,_ as default}; import{C as e}from"./chunks/CliGenerator.qklIY23U.js";import{d as a,c as t,I as o,a1 as r,o as i}from"./chunks/framework.gjrnbxUT.js";const s=r('<h1 id="cli-编译命令生成器" tabindex="-1">CLI 编译命令生成器 <a class="header-anchor" href="#cli-编译命令生成器" aria-label="Permalink to &quot;CLI 编译命令生成器&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>下面选择扩展可能包含所选操作系统不支持的扩展,这可能导致编译失败。请先查阅 <a href="./extensions.html">支持的扩展</a>。</p></div>',2),p=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),c={name:"zh/guide/cli-generator.md"},_=a({...c,setup(l){return(n,d)=>(i(),t("div",null,[s,o(e,{lang:"zh"})]))}});export{p as __pageData,_ as default};

View File

@ -1 +1 @@
import{C as e}from"./chunks/CliGenerator.gfGtDGTf.js";import{d as a,c as t,I as o,a1 as r,o as i}from"./chunks/framework.gjrnbxUT.js";const s=r('<h1 id="cli-编译命令生成器" tabindex="-1">CLI 编译命令生成器 <a class="header-anchor" href="#cli-编译命令生成器" aria-label="Permalink to &quot;CLI 编译命令生成器&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>下面选择扩展可能包含所选操作系统不支持的扩展,这可能导致编译失败。请先查阅 <a href="./extensions.html">支持的扩展</a>。</p></div>',2),p=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),c={name:"zh/guide/cli-generator.md"},_=a({...c,setup(l){return(n,d)=>(i(),t("div",null,[s,o(e,{lang:"zh"})]))}});export{p as __pageData,_ as default}; import{C as e}from"./chunks/CliGenerator.qklIY23U.js";import{d as a,c as t,I as o,a1 as r,o as i}from"./chunks/framework.gjrnbxUT.js";const s=r('<h1 id="cli-编译命令生成器" tabindex="-1">CLI 编译命令生成器 <a class="header-anchor" href="#cli-编译命令生成器" aria-label="Permalink to &quot;CLI 编译命令生成器&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>下面选择扩展可能包含所选操作系统不支持的扩展,这可能导致编译失败。请先查阅 <a href="./extensions.html">支持的扩展</a>。</p></div>',2),p=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),c={name:"zh/guide/cli-generator.md"},_=a({...c,setup(l){return(n,d)=>(i(),t("div",null,[s,o(e,{lang:"zh"})]))}});export{p as __pageData,_ as default};

View File

@ -138,4 +138,36 @@ import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.js";const g
<span class="line"><span>Loaded Configuration File =&gt; /Users/jerry/project/git-project/static-php-cli/php.ini</span></span> <span class="line"><span>Loaded Configuration File =&gt; /Users/jerry/project/git-project/static-php-cli/php.ini</span></span>
<span class="line"><span></span></span> <span class="line"><span></span></span>
<span class="line"><span>$ buildroot/bin/php -i | grep memory</span></span> <span class="line"><span>$ buildroot/bin/php -i | grep memory</span></span>
<span class="line"><span>memory_limit =&gt; 8G =&gt; 8G</span></span></code></pre></div><p> static-php-cli </p><p>使 <code>-P</code> </p><ul><li><code>SPC\\store\\FileSystem</code>: <ul><li><code>::replaceFileStr(string $filename, string $search, $replace)</code>: </li><li><code>::replaceFileStr(string $filename, string $pattern, $replace)</code>: </li><li><code>::replaceFileUser(string $filename, $callback)</code>: </li><li><code>::copyDir(string $from, string $to)</code>: </li><li><code>::convertPath(string $path)</code>: </li><li><code>::scanDirFiles(string $dir, bool $recursive = true, bool|string $relative = false, bool $include_dir = false)</code>: </li></ul></li><li><code>SPC\\builder\\BuilderBase</code>: <ul><li><code>-&gt;getPatchPoint()</code>: </li><li><code>-&gt;getOption(string $key, $default = null)</code>: </li><li><code>-&gt;getPHPVersionID()</code>: PHP ID</li><li><code>-&gt;getPHPVersion()</code>: PHP </li><li><code>-&gt;setOption(string $key, $value)</code>: </li><li><code>-&gt;setOptionIfNotExists(string $key, $value)</code>: </li></ul></li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>static-php-cli <code>public function</code> <code>@internal</code></p></div><h2 id="" tabindex="-1"> <a class="header-anchor" href="#" aria-label="Permalink to &quot;&quot;"></a></h2><p></p><ul><li> PHP 使 <code>bin/spc switch-php-version</code> PHP <code>build</code> </li><li> <code>rm -rf buildroot source</code> </li><li>使 <code>bin/spc del-download &lt;source-name&gt;</code> 使 <code>download &lt;source-name&gt;</code> </li><li>使 <code>bin/spc download --clean</code> </li></ul>`,106),e=[l];function t(h,d,c,k,o,r){return a(),i("div",null,e)}const b=s(p,[["render",t]]);export{g as __pageData,b as default}; <span class="line"><span>memory_limit =&gt; 8G =&gt; 8G</span></span></code></pre></div><p> static-php-cli </p><p>使 <code>-P</code> </p><ul><li><code>SPC\\store\\FileSystem</code>: <ul><li><code>::replaceFileStr(string $filename, string $search, $replace)</code>: </li><li><code>::replaceFileStr(string $filename, string $pattern, $replace)</code>: </li><li><code>::replaceFileUser(string $filename, $callback)</code>: </li><li><code>::copyDir(string $from, string $to)</code>: </li><li><code>::convertPath(string $path)</code>: </li><li><code>::scanDirFiles(string $dir, bool $recursive = true, bool|string $relative = false, bool $include_dir = false)</code>: </li></ul></li><li><code>SPC\\builder\\BuilderBase</code>: <ul><li><code>-&gt;getPatchPoint()</code>: </li><li><code>-&gt;getOption(string $key, $default = null)</code>: </li><li><code>-&gt;getPHPVersionID()</code>: PHP ID</li><li><code>-&gt;getPHPVersion()</code>: PHP </li><li><code>-&gt;setOption(string $key, $value)</code>: </li><li><code>-&gt;setOptionIfNotExists(string $key, $value)</code>: </li></ul></li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>static-php-cli <code>public function</code> <code>@internal</code></p></div><h2 id="" tabindex="-1"> <a class="header-anchor" href="#" aria-label="Permalink to &quot;&quot;"></a></h2><p></p><ul><li> PHP 使 <code>bin/spc switch-php-version</code> PHP <code>build</code> </li><li> <code>rm -rf buildroot source</code> </li><li>使 <code>bin/spc del-download &lt;source-name&gt;</code> 使 <code>download &lt;source-name&gt;</code> </li><li>使 <code>bin/spc download --clean</code> </li></ul><h2 id="embed-使" tabindex="-1">embed 使 <a class="header-anchor" href="#embed-使" aria-label="Permalink to &quot;embed 使&quot;"></a></h2><p> static-php C 使 <code>--build-embed</code> embed PHP</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> {your</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> extensions}</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-embed</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --debug</span></span></code></pre></div><p>PHP embed <code>php-config</code> static-php <code>spc-config</code> 使 embed SAPIlibphp.a使 libphp </p><p> spc-config </p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># output all flags and options</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> curl,zlib,phar,openssl</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># output libs</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> curl,zlib,phar,openssl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --libs</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># output includes</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> curl,zlib,phar,openssl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --includes</span></span></code></pre></div><p>static-php 使</p><ul><li>macOS: <code>clang</code></li><li>Linux (Alpine Linux): <code>gcc</code></li><li>Linux (glibc based distros, x86_64): <code>/usr/local/musl/bin/x86_64-linux-musl-gcc</code></li><li>Linux (glibc based distros, aarch64): <code>/usr/local/musl/bin/aarch64-linux-musl-gcc</code></li><li>FreeBSD: <code>clang</code></li></ul><p>使 embed SAPI </p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// embed.c</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">#include</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &lt;sapi/embed/php_embed.h&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">int</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> main</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">int</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> argc</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">char</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> **</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">argv</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">){</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PHP_EMBED_START_BLOCK</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(argc,argv)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> zend_file_handle file_handle;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> zend_stream_init_filename</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&amp;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">file_handle,</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;embed.php&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">php_execute_script</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&amp;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">file_handle) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> FAILURE){</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> php_printf</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Failed to execute PHP script.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PHP_EMBED_END_BLOCK</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><div class="language-php vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">php</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;?</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">php</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// embed.php</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Hello world!</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span></code></pre></div><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># compile in debian/ubuntu x86_64</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">/usr/local/musl/bin/x86_64-linux-musl-gcc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> embed.c</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> $(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bcmath,zlib</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">-static</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> embed</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># compile in macOS/FreeBSD</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">clang</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> embed.c</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> $(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bcmath,zlib</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">-o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> embed</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./embed</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># out: Hello world!</span></span></code></pre></div>`,118),e=[l];function t(h,k,d,c,o,r){return a(),i("div",null,e)}const y=s(p,[["render",t]]);export{g as __pageData,y as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"本地构建Linux、macOS、FreeBSD","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/manual-build.md","filePath":"zh/guide/manual-build.md"}'),p={name:"zh/guide/manual-build.md"},l=n("",106),e=[l];function t(h,d,c,k,o,r){return a(),i("div",null,e)}const b=s(p,[["render",t]]);export{g as __pageData,b as default}; import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"本地构建Linux、macOS、FreeBSD","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/manual-build.md","filePath":"zh/guide/manual-build.md"}'),p={name:"zh/guide/manual-build.md"},l=n("",118),e=[l];function t(h,k,d,c,o,r){return a(),i("div",null,e)}const y=s(p,[["render",t]]);export{g as __pageData,y as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"en_guide_deps-map.md":"BJ7DRr76","en_guide_cli-generator.md":"X9wvLGpj","en_guide_extension-notes.md":"BaBSDnpT","extension-notes.md":"Bw8xYOie","en_index.md":"Cbpb4iAg","extensions.md":"DNwc8Rjt","index.md":"mKXtywCA","zh_contributing_index.md":"BvgdahxO","zh_develop_doctor-module.md":"DgFAPT6E","en_contributing_index.md":"CsY8mx8F","zh_develop_index.md":"-CPpDfMx","en_faq_index.md":"DLWPz-7S","en_guide_action-build.md":"BKamBazh","zh_develop_php-src-changes.md":"Df0-NcBw","zh_guide_deps-map.md":"CUUanCm-","zh_guide_env-vars.md":"CfYA93uA","zh_guide_index.md":"20ged7P4","zh_guide_troubleshooting.md":"Da-RmPO_","zh_faq_index.md":"DL8Ncj95","zh_index.md":"LslJ1UMp","zh_guide_build-on-windows.md":"BxVEYT8r","zh_guide_cli-generator.md":"De_apypx","zh_guide_action-build.md":"DWMlBDvT","en_develop_structure.md":"BA5PDIse","en_develop_source-module.md":"CdOHR0ez","en_develop_index.md":"B7_c9YYa","deps-map-lib.md":"Bw2LITOZ","deps-map-ext.md":"Dm1vf8Tb","zh_guide_extensions.md":"4RlrEtHJ","zh_guide_extension-notes.md":"Bk8p1Uuk","en_guide_env-vars.md":"DXDG6yvH","en_guide_build-on-windows.md":"0XosmiyO","zh_develop_system-build-tools.md":"Ds53VEw1","en_guide_troubleshooting.md":"BC56sVyT","en_develop_doctor-module.md":"DGd8PeM_","en_guide_manual-build.md":"BF0Q0syR","en_guide_index.md":"CjOUKFgy","zh_develop_structure.md":"B-0RMSSw","en_guide_extensions.md":"BSTS0pXb","en_develop_system-build-tools.md":"D6vaAwN3","en_develop_php-src-changes.md":"DLlooohw","zh_guide_manual-build.md":"BbIO7lI2","zh_develop_source-module.md":"D0odLsHX"} {"en_contributing_index.md":"CsY8mx8F","en_develop_index.md":"B7_c9YYa","deps-map-lib.md":"Bw2LITOZ","en_develop_structure.md":"BA5PDIse","deps-map-ext.md":"Dm1vf8Tb","en_develop_doctor-module.md":"DGd8PeM_","en_guide_env-vars.md":"DXDG6yvH","en_develop_php-src-changes.md":"DLlooohw","en_guide_extensions.md":"BSTS0pXb","index.md":"mKXtywCA","en_guide_troubleshooting.md":"BC56sVyT","zh_develop_doctor-module.md":"DgFAPT6E","extensions.md":"DNwc8Rjt","en_develop_system-build-tools.md":"D6vaAwN3","en_faq_index.md":"DLWPz-7S","en_index.md":"Cbpb4iAg","zh_develop_index.md":"-CPpDfMx","en_guide_extension-notes.md":"BaBSDnpT","zh_guide_action-build.md":"DWMlBDvT","zh_guide_cli-generator.md":"Drmu_Y5P","zh_guide_extension-notes.md":"Bk8p1Uuk","en_develop_source-module.md":"CdOHR0ez","zh_guide_build-on-windows.md":"BxVEYT8r","zh_guide_env-vars.md":"CfYA93uA","en_guide_action-build.md":"BKamBazh","en_guide_build-on-windows.md":"0XosmiyO","en_guide_cli-generator.md":"DbmUdDDk","zh_guide_manual-build.md":"CPnjjhB_","zh_develop_php-src-changes.md":"Df0-NcBw","zh_guide_extensions.md":"4RlrEtHJ","zh_contributing_index.md":"BvgdahxO","en_guide_deps-map.md":"BJ7DRr76","zh_develop_structure.md":"B-0RMSSw","zh_guide_index.md":"20ged7P4","zh_develop_system-build-tools.md":"Ds53VEw1","zh_develop_source-module.md":"D0odLsHX","zh_faq_index.md":"DL8Ncj95","extension-notes.md":"Bw8xYOie","zh_guide_troubleshooting.md":"Da-RmPO_","zh_index.md":"LslJ1UMp","en_guide_index.md":"CjOUKFgy","en_guide_manual-build.md":"cuxk79AG","zh_guide_deps-map.md":"CUUanCm-"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long