An embedded scripting language and evaluation engine for Rust, designed for safe and easy scripting integration.
Rhai is an embedded scripting language and evaluation engine for Rust that allows developers to safely add scripting capabilities to their applications. It provides a lightweight, sandboxed environment with a simple syntax similar to JavaScript, enabling dynamic logic extension, user customization, and domain-specific language creation without compromising performance or security.
Rust developers who need to embed scripting in their applications, such as game developers for modding support, tool builders for user extensibility, or system programmers requiring safe, sandboxed script evaluation.
Developers choose Rhai for its tight integration with Rust, strong safety guarantees, and minimal overhead, offering a balance between flexibility and control where scripts can interact with native code securely and efficiently.
Rhai - An embedded scripting language for Rust.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Seamlessly exposes native Rust functions, types, and methods to scripts, with support for getters, setters, and indexers as detailed in The Rhai Book.
Provides robust protections against stack-overflow, oversized data, and runaway scripts, adhering to a 'Don't Panic' guarantee for host system stability.
Features optimized AST compilation and evaluation, with benchmarks showing 1 million iterations in 0.14 seconds on a standard VM.
Allows disabling features, defining custom operators, and extending syntax, making it flexible for creating domain-specific languages.
Lacks advanced features like static typing, comprehensive metaprogramming, or a rich standard library compared to full scripting languages such as Python or JavaScript.
Cannot be used outside Rust projects, restricting utility in polyglot environments or with other programming languages.
IDE plugins and debugging interfaces are less mature than those for established languages, potentially hindering script development and troubleshooting efficiency.