Related Resources

Online resources

External tools

Syntax highlighting

  • VS Code Extension – Support .rhai script files syntax highlighting for Visual Studio Code

  • Sublime Text 3 Plugin – Support .rhai script files syntax highlighting for Sublime Text 3

  • For other syntax highlighting purposes, e.g. vim, highlight.js, both Rust or JavaScript can be used successfully.

    Use rust when there is no string interpolation. This way, closures and functions (via the fn keyword) are styled properly. Elements not highlighted include:

    Use js (JavaScript) when there is strings interpolation. Elements not highlighted include:

    • functions definition (via the fn keyword)
    • closures (via the Rust-like |...| { ... } syntax)
    • built-in functions such as Fn, call, type_of, is_shared, is_def_var, is_def_fn

Other cool projects