Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ <h1>go-embedded-ruby</h1>
<span class="pill">JSON · Base64 · Digest</span>
<span class="pill">scientific stack: NDArray · FFT · images</span>
<span class="pill">Complex · Rational · Set</span>
<span class="pill">runs in the browser (WebAssembly)</span>
<span class="pill">WebAssembly target (js/wasm) · runs in the browser</span>
<span class="pill">100% coverage · 6 arches</span>
<span class="pill">differential-tested vs MRI + JRuby</span>
<span class="pill">differential-tested vs MRI · JRuby · TruffleRuby</span>
</div>
<div class="cta">
<a class="btn primary" href="/docs/">Documentation</a>
Expand Down Expand Up @@ -140,7 +140,7 @@ <h3>{{ .name }} <span class="status {{ .status }}">{{ .status }}</span></h3>
A bytecode VM with the front-end embedded keeps Ruby's dynamism — eval, runtime require,
monkey-patching, method_missing — at your fingertips. Ruby objects are Go heap objects, so the
Go garbage collector is reused. The standard library is selected at build time and tree-shaken.
Semantics track Ruby 4.0, grown test-first against an MRI 4.0.5 and JRuby differential oracle, with
Semantics track Ruby 4.0, grown test-first against an MRI 4.0.5, JRuby (and TruffleRuby) differential oracle, with
<strong>100% coverage enforced in CI across all six 64-bit architectures</strong> (amd64, arm64,
riscv64, loong64, ppc64le, s390x) and three OSes. Two core pieces are reusable pure-Go modules in
sibling orgs, imported by the interpreter (and usable by any Go program without cgo): the
Expand All @@ -156,19 +156,27 @@ <h3>{{ .name }} <span class="status {{ .status }}">{{ .status }}</span></h3>
container/value types <a href="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/go-composites/set">Set</a>, <code>Bag</code>,
<code>Time</code>, <code>Date</code> and <code>BigDecimal</code> (from
<a href="/go-composites">go-composites</a>) — alongside <code>Complex</code>,
<code>Rational</code> and <code>Math</code>. Because the whole stack is pure Go it also compiles to
<strong>WebAssembly and runs entirely in the browser</strong>: a
<a href="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/go-embedded-ruby/ruby/tree/main/web">playground</a> offers a Ruby REPL
and an image pipeline (load → blur/edges → render) with no server-side code.</p>
<code>Rational</code> and <code>Math</code>.</p>
<p class="principles"><strong>WebAssembly is a first-class target.</strong> Because everything is pure Go
with cgo disabled, the interpreter and the whole stack compile to <code>GOOS=js GOARCH=wasm</code> and
run <strong>entirely in the browser</strong> — there is no server-side code. It ships two ways: a
self-contained <a href="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/go-embedded-ruby/ruby/tree/main/web">playground</a> links
the full interpreter (front-end included) so a page can evaluate <em>arbitrary</em> Ruby — a REPL plus
an image pipeline (load → blur/edges → render) — while
<code>rbgo build --closed --target wasm app.rb</code> cross-compiles a closed-world wasm app that runs
<em>one</em> program with no front-end linked and drives the page's DOM and Canvas through the built-in
<code>JS</code> module (<code>JS.document</code>, <code>JS.log</code>, <code>JS::Ref#call</code>,
<code>JS.raf</code>) — a Ruby browser app with no hand-written JavaScript.</p>
<p class="principles"><strong>Conformance &amp; benchmarking.</strong> Correctness is judged against
<strong>two independent reference implementations</strong> of Ruby 4.0 — <strong>MRI (CRuby) 4.0.5</strong>
and <strong>JRuby</strong> — with a three-way differential oracle
<strong>independent reference implementations</strong> of Ruby 4.0 — <strong>MRI (CRuby) 4.0.5</strong>
and <strong>JRuby</strong>, with <strong>TruffleRuby</strong> being added as a third reference — via a
differential oracle
(<a href="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/go-embedded-ruby/ruby/blob/main/scripts/oracle.sh"><code>scripts/oracle.sh</code></a>
runs a snippet through all three and flags any divergence). Beyond synthetic tests, the bar is
runs a snippet through rbgo and the references and flags any divergence). Beyond synthetic tests, the bar is
real-world Ruby: idioms and test suites drawn from <strong>reference applications</strong> — Ruby on
Rails (ActiveSupport's pure-Ruby <code>core_ext</code>) and <strong>OpenVox</strong>/Puppet
(Ruby-heavy manifest evaluation) — drive the remaining work by demand and double as both conformance
corpora and performance baselines (pure-Go CGO=0 vs CRuby's C and JRuby's JVM JIT).</p>
corpora and performance baselines (pure-Go CGO=0 vs CRuby's C, JRuby's JVM JIT and TruffleRuby's Graal).</p>
</main>

<footer class="wrap">
Expand Down