diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-05-06 16:12:27 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-05-06 16:12:27 +0900 |
| commit | 21136ab8db7572c527726f93009b4b72bf00f9a9 (patch) | |
| tree | 34805d49d55af7ac58e5b87d224de43fb7819c73 /vhosts/blog/public/posts/2023-10-02 | |
| parent | 83c58924bfd9f22ef4ff84fd3439535e4753ec53 (diff) | |
| download | nsfisis.dev-21136ab8db7572c527726f93009b4b72bf00f9a9.tar.gz nsfisis.dev-21136ab8db7572c527726f93009b4b72bf00f9a9.tar.zst nsfisis.dev-21136ab8db7572c527726f93009b4b72bf00f9a9.zip | |
feat(blog/nuldoc): implement codeblock filename
Diffstat (limited to 'vhosts/blog/public/posts/2023-10-02')
| -rw-r--r-- | vhosts/blog/public/posts/2023-10-02/compile-php-runtime-to-wasm/index.html | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/vhosts/blog/public/posts/2023-10-02/compile-php-runtime-to-wasm/index.html b/vhosts/blog/public/posts/2023-10-02/compile-php-runtime-to-wasm/index.html index 38ecf3f1..6b59676c 100644 --- a/vhosts/blog/public/posts/2023-10-02/compile-php-runtime-to-wasm/index.html +++ b/vhosts/blog/public/posts/2023-10-02/compile-php-runtime-to-wasm/index.html @@ -14,7 +14,7 @@ <meta property="og:locale" content="ja_JP"> <link rel="icon" type="image/svg+xml" href="/favicon.svg"> <title>PHP の処理系を Emscripten で WebAssembly にコンパイルする|REPL: Rest-Eat-Program Loop</title> - <link rel="stylesheet" href="/style.css?h=8415c13be008f55a351b69c568b3e8ed"> + <link rel="stylesheet" href="/style.css?h=ad87bb00eb411fe20ba3a8366c69e490"> </head> <body class="single"> <header class="header"> @@ -104,6 +104,9 @@ 先にこの記事のゴールを示しておく。これから示す手順のとおりに進めると、次のようなコードが動くようになる。 このコードはこのあと使うので、<code>index.mjs</code> の名前で保存しておくこと。 </p> <div class="codeblock"> + <div class="filename"> + index.mjs + </div> <pre class="shiki github-light" style="background-color:#f5f5f5;color:#24292e" tabindex="0"><code><span class="line"><span style="color:#D73A49">import</span><span style="color:#24292E"> { readFile } </span><span style="color:#D73A49">from</span><span style="color:#032F62"> 'node:fs/promises'</span><span style="color:#24292E">;</span></span> <span class="line"><span style="color:#D73A49">import</span><span style="color:#24292E"> PHPWasm </span><span style="color:#D73A49">from</span><span style="color:#032F62"> './php-wasm.mjs'</span></span> <span class="line"></span> @@ -357,12 +360,12 @@ <code>Dockerfile</code>、<code>php-wasm.c</code>、<code>index.mjs</code> を用意したら、Docker コンテナをビルドして実行する。 </p> <div class="codeblock"> - <pre class="shiki github-light" style="background-color:#f5f5f5;color:#24292e" tabindex="0"><code><span class="line"><span style="color:#24292E">$ docker build -t php-wasm .</span></span> -<span class="line"><span style="color:#24292E">$ echo </span><span style="color:#032F62">'echo "Hello, World!", PHP_EOL;'</span><span style="color:#24292E"> | docker run --rm -i php-wasm</span></span> -<span class="line"><span style="color:#24292E">Hello, World!</span></span> -<span class="line"></span> -<span class="line"></span> -<span class="line"><span style="color:#24292E">exit code: 0</span></span></code></pre> + <pre class="shiki github-light" style="background-color:#f5f5f5;color:#24292e" tabindex="0"><code><span class="line"><span>$ docker build -t php-wasm .</span></span> +<span class="line"><span>$ echo 'echo "Hello, World!", PHP_EOL;' | docker run --rm -i php-wasm</span></span> +<span class="line"><span>Hello, World!</span></span> +<span class="line"><span></span></span> +<span class="line"><span></span></span> +<span class="line"><span>exit code: 0</span></span></code></pre> </div> </section> <section id="section--outro"> |
