Back to directory

Rhai

An embedded scripting language and evaluation engine for Rust, with a JavaScript-and-Rust-like syntax, dynamic typing, and tight integration with native Rust functions and types.

Rhai

Rhai is an embedded scripting language and evaluation engine for Rust, giving a safe and easy way to add scripting to any application. It supports every CPU and OS target that Rust supports, including WebAssembly and no-std, and needs Rust 1.66.0 or later.

Its syntax resembles JavaScript and Rust with dynamic typing, and it integrates tightly with native Rust functions and types, including getters and setters, methods, and indexers; Rust values can be passed into a script as variables or constants through an external scope without implementing any special trait. An optional bytecode compiler and VM roughly doubles evaluation speed over the standard AST walker. Other features include compiling once to an AST for repeated evaluation, closures that capture shared values, function and operator overloading, dynamically loadable modules, serialization through serde, and a debugging interface.

More in Languages

See all 48
  • QBasic Web Editor

    vahidyousefzadeh.com

    A browser-based QBasic 1.1 editor and interpreter that runs classic QBasic programs with DOSBox-accurate behavior, including text-mode graphics commands such as PRINT, COLOR and LOCATE, with sample programs and keyboard shortcuts to run and save.

  • A Brainfuck-inspired esoteric programming language adding absolute memory navigation, multiplier arithmetic, non-destructive inspection and inline conditionals, with its own interpreter.

  • C3 Playground

    play.c3-lang.org

    An in-browser playground that compiles and runs the C3 programming language entirely in WebAssembly, with no backend server, alongside its standard library and documentation.