Skip to main content

R8

Author

E.D. Gennatas

Published

November 28, 2026

R8

E.D. Gennatas, MBBS AICSM PhD Updated: 2026-11-28

R8

R8 is a type system for R whose runtime is written in Rust. Types are structs, enums, tables, and traits, declared in R; values are immutable R lists that are validated once, at construction, and one declaration drives validation, JSON documents, content hashes, and the JSON Schema of the type’s values.

Structs and enums

Product types with typed, constrained fields and defaults; sum types whose variants carry their own fields.

Validation and rules

Every constraint and rule is checked at construction and on each field update; an error names every problem with its path.

Tables

Columns with types, ranges, and units, and rules across them, checked in Rust over R’s own vectors.

Rules as values

A rule checks the values of a type, filters any table, combines with other rules, and is saved as any object.

Methods and traits

Behavior declared in R style, as generics and methods, or in Rust style, as traits and impls, dispatched on the value’s type.

JSON and hashes

Documents that read back to identical values, and SHA-256 content hashes that agree across languages.

Installation

R8 is on r-universe:

install.packages(
  "R8",
  repos = c("https://rtemis-org.r-universe.dev", "https://cloud.r-project.org")
)

The runtime is the Rust crate rtemis-r8. The r-universe binaries need no Rust toolchain; an installation from source needs rustc 1.88 or later.

The package R8.io, which reads and writes CSV, TSV, and Parquet files as R8 tables (Reading a file), is on the same repository: install.packages("R8.io", repos = ...), with the repos above.

Reading the guide

The Introduction presents the examples and the two styles in which R8 declares behavior, and Types between R and Rust follows a declaration and a construction through R and Rust. A reader follows one of the two style parts:

© 2026 E.D. Gennatas