The Rhai Book

Rhai Logo

Rhai is an embedded scripting language and evaluation engine for Rust that gives a safe and easy way to add scripting to any application.


This Book is for version 1.7.0 of Rhai.

For the latest development version, see here.


Etymology of the name “Rhai”

In the beginning there was ChaiScript, which is an embedded scripting language for C++. Originally it was intended to be a scripting language similar to JavaScript.

With java being a kind of hot beverage, the new language was named after another hot beverage – Chai, which is the word for “tea” in many world languages and, in particular, a popular kind of spicy milk tea consumed in India.

Later, when the novel implementation technique behind ChaiScript was ported from C++ to Rust, logically the C was changed to an R to make it “RhaiScript”, or just “Rhai”.

– Rhai author Johnathan Turner

The domain

@yrashk sponsored the domain