File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ Create and save `index.html` page with the following contents:
1515
1616``` html
1717<html >
18- <script src =" https://cdn.jsdelivr.net/npm/ruby-head -wasm-wasi@0.6.0 /dist/browser.script.iife.js" ></script >
18+ <script src =" https://cdn.jsdelivr.net/npm/ruby-3_2 -wasm-wasi@1.0.1 /dist/browser.script.iife.js" ></script >
1919 <script type =" text/ruby" >
2020 puts " Hello, world!"
2121 </script >
@@ -28,18 +28,18 @@ Dependencies: [wasi-vfs](https://github.com/kateinoigakukun/wasi-vfs), [wasmtime
2828
2929``` console
3030# Download a prebuilt Ruby release
31- $ curl -LO https://github.com/ruby/ruby.wasm/releases/latest/download/ruby-head -wasm32-unknown-wasi-full.tar.gz
32- $ tar xfz ruby-head -wasm32-unknown-wasi-full.tar.gz
31+ $ curl -LO https://github.com/ruby/ruby.wasm/releases/latest/download/ruby-3_2 -wasm32-unknown-wasi-full.tar.gz
32+ $ tar xfz ruby-3_2 -wasm32-unknown-wasi-full.tar.gz
3333
3434# Extract ruby binary not to pack itself
35- $ mv head -wasm32-unknown-wasi-full/usr/local/bin/ruby ruby.wasm
35+ $ mv 3_2 -wasm32-unknown-wasi-full/usr/local/bin/ruby ruby.wasm
3636
3737# Put your app code
3838$ mkdir src
3939$ echo " puts 'Hello'" > src/my_app.rb
4040
4141# Pack the whole directory under /usr and your app dir
42- $ wasi-vfs pack ruby.wasm --mapdir /src::./src --mapdir /usr::./head -wasm32-unknown-wasi-full/usr -o my-ruby-app.wasm
42+ $ wasi-vfs pack ruby.wasm --mapdir /src::./src --mapdir /usr::./3_2 -wasm32-unknown-wasi-full/usr -o my-ruby-app.wasm
4343
4444# Run the packed scripts
4545$ wasmtime my-ruby-app.wasm -- /src/my_app.rb
You can’t perform that action at this time.
0 commit comments