Skip to content

go-embedded-r documentation

A pure-Go, embeddable R interpreter, in development: v0.5.0 completes M0 (oracle harness against GNU R 4.6.2), M1 (parser and deparse) and slices 1 to 3 of M2 (evaluator); its regex is an approximation, not TRE; M3 to M8 are planned.

go-embedded-r is in development. v0.5.0 (2026-11-05) of go-embedded-r/r completes milestone M0 (the oracle harness, against the pinned GNU R 4.6.2), milestone M1 (the parser and deparse, package syntax), which agrees with R’s tree, tokens, error text and deparse output on 842 of 842 files of R’s base packages, and slices 1 to 3 of milestone M2. The evaluator (package eval) has 102 of R’s 210 primitives and 94 base closures, with replacement, subsetting, attributes, S3 dispatch, conditions, print, environments as values, the apply family, string functions and regular expressions; 1 035 of 1 035 goldens match R 4.6.2. Its regular expressions are an approximation on Go’s regexp, not TRE: see Regular expressions. M2 is not finished. Base, stats, the rest of regex, graphics, the notebook bridge, the WebAssembly playground and CRAN ports (M3 to M8) are planned and not started. The interpreter is therefore not finished.

The statements on these pages come from the README of go-embedded-r/r on main and its docs/m2-design.md, and from the plan the README links, bib/r.md of the go-scikit roadmap.

What it will be

An R interpreter written in pure Go (CGO_ENABLED=0), meant to be embedded in Go programs and to run in the browser through WebAssembly. Every stage is checked against the reference implementation, the pinned GNU R 4.6.2 (CRAN tarball, SVN revision 90784), never against expectations written by hand.

What it is for

The r cells of go-notebook, the way julia backs its Julia cells and rbgo its Ruby cells.

Pages

PageWhat it holds
Planthe milestones: M0 and M1 done, M2 slices 1 to 3 done, M3 to M8 planned
The parserpackage syntax: the API, the tree, the errors, the bounds, and the parity table with R 4.6.2
Deparsesyntax.Deparse: parity with R 4.6.2 and the platform divergences
EvaluatorM2, package eval: the design choices, slices 1 to 3 (102 of 210 primitives and 94 base closures), judged by the oracle
Regular expressionsv0.5.0: an approximation on Go’s regexp, not TRE; what differs from R and what is refused
Eval APINewSession, Options and its default limits (bounded since v0.4.0), Eval, Result and Error
The oracle harnessinternal/oracle, rds, cmd/roracle, the goldens, and how to get the oracle
LicencesBSD-3-Clause, and what “clean room” means here

Repositories

RepoWhat it is
rthe interpreter (source)
docsthis site
go-embedded-r.github.iothe landing page

Created on by tannevaled

Modified on by tannevaled