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:
15
15
16
16
``` html
17
17
<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 >
19
19
<script type =" text/ruby" >
20
20
puts " Hello, world!"
21
21
</script >
@@ -28,18 +28,18 @@ Dependencies: [wasi-vfs](https://github.com/kateinoigakukun/wasi-vfs), [wasmtime
28
28
29
29
``` console
30
30
# 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
33
33
34
34
# 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
36
36
37
37
# Put your app code
38
38
$ mkdir src
39
39
$ echo " puts 'Hello'" > src/my_app.rb
40
40
41
41
# 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
43
43
44
44
# Run the packed scripts
45
45
$ wasmtime my-ruby-app.wasm -- /src/my_app.rb
You can’t perform that action at this time.
0 commit comments