Skip to content

Commit

Permalink
contents/en/documents/webassembly: fix the location of wasm_exec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Jan 8, 2025
1 parent ec0a29c commit fe573a4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion contents/en/documents/webassembly.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,18 @@ <h3>Compiling your game</h3>
Remove-Item Env:GOARCH</code></pre>
<h3>Copying <code>wasm_exec.js</code> to execute the WebAssembly binary</h3>
<p>On a Unix/Linux shell:</p>
<pre><code>cp $(go env GOROOT)/misc/wasm/wasm_exec.js .</code></pre>
<pre><code># Go 1.24 and newer
cp $(go env GOROOT)/lib/wasm/wasm_exec.js .

# Go 1.23 and older
cp $(go env GOROOT)/misc/wasm/wasm_exec.js .</code></pre>
<p>On Windows PowerShell:</p>
<pre><code>$goroot = go env GOROOT

# Go 1.24 and newer
cp $goroot\lib\wasm\wasm_exec.js .

# Go 1.23 and older
cp $goroot\misc\wasm\wasm_exec.js .</code></pre>
<h3>Creating an HTML</h3>
<p>Create this HTML:</p>
Expand Down
11 changes: 10 additions & 1 deletion contents/ja/documents/webassembly.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,18 @@ <h3>ゲームのコンパイル</h3>
Remove-Item Env:GOARCH</code></pre>
<h3>WebAssembly バイナリを実行するための <code>wasm_exec.js</code> のコピー</h3>
<p>Unix/Linux シェルの場合:</p>
<pre><code>cp $(go env GOROOT)/misc/wasm/wasm_exec.js .</code></pre>
<pre><code># Go 1.24 以後
cp $(go env GOROOT)/lib/wasm/wasm_exec.js .

# Go 1.23 以前
cp $(go env GOROOT)/misc/wasm/wasm_exec.js .</code></pre>
<p>Windows PowerShell の場合:</p>
<pre><code>$goroot = go env GOROOT

# Go 1.24 以後
cp $goroot\lib\wasm\wasm_exec.js .

# Go 1.23 以前
cp $goroot\misc\wasm\wasm_exec.js .</code></pre>
<h3>HTML の作成</h3>
<p>次のような HTML を作成してください:</p>
Expand Down

0 comments on commit fe573a4

Please sign in to comment.