Skip to content

Commit 82fe3c4

Browse files
Make README.md rdoc friendly
1 parent 558e7b9 commit 82fe3c4

File tree

1 file changed

+68
-17
lines changed

1 file changed

+68
-17
lines changed

README.md

Lines changed: 68 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
[![Build ruby.wasm](https://github.com/ruby/ruby.wasm/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/ruby/ruby.wasm/actions/workflows/build.yml)
2-
31
# ruby.wasm
42

3+
[![Build ruby.wasm](https://github.com/ruby/ruby.wasm/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/ruby/ruby.wasm/actions/workflows/build.yml)
4+
55
ruby.wasm is a collection of WebAssembly ports of the [CRuby](https://github.com/ruby/ruby).
66
It enables running Ruby application on browsers, WASI compatible WebAssembly runtimes, and Edge Computing platforms.
77

88
## Try ruby.wasm (no installation needed)
99

10-
Try ruby.wasm in [TryRuby](https://try.ruby-lang.org/playground/#code=3.times+do%0A++print+'Welcome+'%0Aend&engine=cruby-3.2.0dev) in your browser.
10+
Try ruby.wasm in [TryRuby](https://try.ruby-lang.org/playground#code=puts+RUBY_DESCRIPTION&engine=cruby-3.2.0dev) in your browser.
1111

1212
## Quick Example: Ruby on browser
1313

@@ -50,10 +50,27 @@ Hello
5050

5151
See the `README.md` of each package for more detail and its usage.
5252

53-
| Package | Description | npm |
54-
| ------------------------------------------------------------------------------ | ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
55-
| [ruby-head-wasm-wasi](./packages/npm-packages/ruby-head-wasm-wasi) | HEAD CRuby built on WASI with JS interop support | [![npm version](https://badge.fury.io/js/ruby-head-wasm-wasi.svg)](https://badge.fury.io/js/ruby-head-wasm-wasi) |
56-
| [ruby-head-wasm-emscripten](./packages/npm-packages/ruby-head-wasm-emscripten) | HEAD CRuby built on Emscripten (not well tested) | [![npm version](https://badge.fury.io/js/ruby-head-wasm-emscripten.svg)](https://badge.fury.io/js/ruby-head-wasm-emscripten) |
53+
<table>
54+
<thead>
55+
<tr>
56+
<th>Package</th>
57+
<th>Description</th>
58+
<th>npm</th>
59+
</tr>
60+
</thead>
61+
<tbody>
62+
<tr>
63+
<td><a href="/ruby/ruby.wasm/blob/main/packages/npm-packages/ruby-head-wasm-wasi">ruby-head-wasm-wasi</a></td>
64+
<td>HEAD CRuby built on WASI with JS interop support</td>
65+
<td><a href="https://badge.fury.io/js/ruby-head-wasm-wasi" rel="nofollow"><img src="https://badge.fury.io/js/ruby-head-wasm-wasi.svg" alt="npm version" style="max-width: 100%;"></a></td>
66+
</tr>
67+
<tr>
68+
<td><a href="/ruby/ruby.wasm/blob/main/packages/npm-packages/ruby-head-wasm-emscripten">ruby-head-wasm-emscripten</a></td>
69+
<td>HEAD CRuby built on Emscripten (not well tested)</td>
70+
<td><a href="https://badge.fury.io/js/ruby-head-wasm-emscripten" rel="nofollow"><img src="https://badge.fury.io/js/ruby-head-wasm-emscripten.svg" alt="npm version" style="max-width: 100%;"></a></td>
71+
</tr>
72+
</tbody>
73+
</table>
5774

5875
## Prebuilt binaries
5976

@@ -62,19 +79,53 @@ A _build_ is a combination of ruby version, _profile_, and _target_.
6279

6380
### Supported Target Triples
6481

65-
| Triple | Description |
66-
|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
67-
| `wasm32-unknown-wasi` | Targeting WASI-compatible environments (e.g. Node.js, browsers with polyfill, [wasmtime](https://github.com/bytecodealliance/wasmtime), and so on) |
68-
| `wasm32-unknown-emscripten` | Targeting JavaScript environments including Node.js and browsers |
82+
<table>
83+
<thead>
84+
<tr>
85+
<th>Triple</th>
86+
<th>Description</th>
87+
</tr>
88+
</thead>
89+
<tbody>
90+
<tr>
91+
<td><code>wasm32-unknown-wasi</code></td>
92+
<td>Targeting WASI-compatible environments (e.g. Node.js, browsers with polyfill, <a href="https://github.com/bytecodealliance/wasmtime">wasmtime</a>, and so on)</td>
93+
</tr>
94+
<tr>
95+
<td><code>wasm32-unknown-emscripten</code></td>
96+
<td>Targeting JavaScript environments including Node.js and browsers</td>
97+
</tr>
98+
</tbody>
99+
</table>
69100

70101
### Profiles
71102

72-
| Profile | Description |
73-
|-----------|-------------------------------------------------------------------------------------------------------------------------------|
74-
| `minimal` | No standard extension libraries (like `json`, `yaml`, or `stringio`) |
75-
| `full` | All standard extension libraries |
76-
| `*-js` | Enabled JS interoperability, only usable with npm package |
77-
| `*-debug` | With DWARF info and [`name` section](https://webassembly.github.io/spec/core/appendix/custom.html#name-section) for debugging |
103+
<table>
104+
<thead>
105+
<tr>
106+
<th>Profile</th>
107+
<th>Description</th>
108+
</tr>
109+
</thead>
110+
<tbody>
111+
<tr>
112+
<td><code>minimal</code></td>
113+
<td>No standard extension libraries (like <code>json</code>, <code>yaml</code>, or <code>stringio</code>)</td>
114+
</tr>
115+
<tr>
116+
<td><code>full</code></td>
117+
<td>All standard extension libraries</td>
118+
</tr>
119+
<tr>
120+
<td><code>*-js</code></td>
121+
<td>Enabled JS interoperability, only usable with npm package</td>
122+
</tr>
123+
<tr>
124+
<td><code>*-debug</code></td>
125+
<td>With DWARF info and <a href="https://webassembly.github.io/spec/core/appendix/custom.html#name-section" rel="nofollow"><code>name</code> section</a> for debugging</td>
126+
</tr>
127+
</tbody>
128+
</table>
78129

79130
Note: `*` is a wildcard that represents any other profile name except for itself, applied recursively. For example, `minimal-full-js-debug` is a valid profile.
80131

0 commit comments

Comments
 (0)