From afa5480477970eb2bf5f18288a722b683ca134e5 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Thu, 25 Jun 2026 21:26:31 +0200 Subject: [PATCH] landing: present WebAssembly as a first-class target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The wasm story was a single clause inside the scientific-stack paragraph; make it a first-class capability and cover both wasm paths plus the JS module. - Promote the WebAssembly pill ("WebAssembly target (js/wasm) · runs in the browser") and add a dedicated "WebAssembly is a first-class target" paragraph describing both the playground (full interpreter, evaluates arbitrary Ruby) and `rbgo build --closed --target wasm` (closed-world wasm app driving the DOM/Canvas through the built-in JS module). - Note TruffleRuby is being added as a third reference implementation alongside MRI and JRuby (pill + conformance/oracle prose). Theme toggle and layout untouched; verified with `hugo` (clean build). Co-Authored-By: Claude Opus 4.8 --- layouts/index.html | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index a6458d3..1c38fb0 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -100,9 +100,9 @@

go-embedded-ruby

JSON · Base64 · Digest scientific stack: NDArray · FFT · images Complex · Rational · Set - runs in the browser (WebAssembly) + WebAssembly target (js/wasm) · runs in the browser 100% coverage · 6 arches - differential-tested vs MRI + JRuby + differential-tested vs MRI · JRuby · TruffleRuby
Documentation @@ -140,7 +140,7 @@

{{ .name }} {{ .status }}

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 100% coverage enforced in CI across all six 64-bit architectures (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 @@ -156,19 +156,27 @@

{{ .name }} {{ .status }}

container/value types Set, Bag, Time, Date and BigDecimal (from go-composites) — alongside Complex, - Rational and Math. Because the whole stack is pure Go it also compiles to - WebAssembly and runs entirely in the browser: a - playground offers a Ruby REPL - and an image pipeline (load → blur/edges → render) with no server-side code.

+ Rational and Math.

+

WebAssembly is a first-class target. Because everything is pure Go + with cgo disabled, the interpreter and the whole stack compile to GOOS=js GOARCH=wasm and + run entirely in the browser — there is no server-side code. It ships two ways: a + self-contained playground links + the full interpreter (front-end included) so a page can evaluate arbitrary Ruby — a REPL plus + an image pipeline (load → blur/edges → render) — while + rbgo build --closed --target wasm app.rb cross-compiles a closed-world wasm app that runs + one program with no front-end linked and drives the page's DOM and Canvas through the built-in + JS module (JS.document, JS.log, JS::Ref#call, + JS.raf) — a Ruby browser app with no hand-written JavaScript.

Conformance & benchmarking. Correctness is judged against - two independent reference implementations of Ruby 4.0 — MRI (CRuby) 4.0.5 - and JRuby — with a three-way differential oracle + independent reference implementations of Ruby 4.0 — MRI (CRuby) 4.0.5 + and JRuby, with TruffleRuby being added as a third reference — via a + differential oracle (scripts/oracle.sh - 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 reference applications — Ruby on Rails (ActiveSupport's pure-Ruby core_ext) and OpenVox/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).

+ corpora and performance baselines (pure-Go CGO=0 vs CRuby's C, JRuby's JVM JIT and TruffleRuby's Graal).