Rhai is an embedded scripting language and evaluation engine for Rust that gives a safe and easy way to add scripting to any application.
- Syntax highlighting
- Grain bytecode compile
- Compile on Save
- Nested Grain bytecode file under Rhai files
- Showing compilation Errors
- Auto formatter
- Language server
-
Search for
Rhai Language Supportin Visual Studio Code. -
Download directly from the Visual Studio Marketplace.
Use Ctrl + Shift + P or Command + Shift + P to open the command palette and type Rhai:.
| Command | description |
|---|---|
rhai.compileGrain |
Compile Rhai current file to Grain bytecode |
rhai.format |
Rhai: Format File |
rhai.syntaxCheckRhai |
Rhai: Syntax check on current Rhai file |
Use the Settings panel or settings.json in Visual Studio Code or command + , (Windows / Linux: File -> Preferences -> User Settings) open the vscode file settings.json
| type | default | description | |
|---|---|---|---|
rhai.compileGrainOnSave |
string | off |
Compile Rhai files to Grain bytecode on save |
rhai.promptFileNesting |
boolean | true |
Prompt to ask if the Rhai file nesting should be enabled, so compiled .rgrn files can nest under their .rhai source. |
rhai.trace.server |
string | off |
Traces the communication between VS Code and the language server. |
rhai.syntaxCheckRhaiOnChange |
string | off |
Enable syntax check on Rhai file on file change. |
rhai.syntaxCheckRhaiDelaySeconds |
number | 3 |
Seconds to wait after typing stops before running syntax check. |
rhai.useLanguageServer |
boolean | true |
Use Rhai Language Server. (WIP) |

