Installation
Rue is currently in alpha. Please use it with caution and report any bugs you find in doing so.
First, you will need to install the Rust toolchain.
You can install the Rue CLI with this command:
cargo install rue-cli
It's also useful to install clvm_tools_rs:
cargo install clvm_tools_rs
Editor Support
- VSCode
- Cursor
You will need to install Visual Studio Code.
Then, you can install the Rue extension on the VSCode marketplace. It provides syntax highlighting and LSP integration.
You can install the Rue language server with this command:
cargo install rue-lsp
This should automatically work with the extension.
You will need to install Cursor.
Then, you can install the Rue extension on the Open VSX marketplace. It provides syntax highlighting and LSP integration.
You can install the Rue language server with this command:
cargo install rue-lsp
This should automatically work with the extension.
Any editor that supports Open VSX and VSCode extensions will likely support this.
Hello World
The simplest example of a program in Rue is the classic hello world example.
Write the following program in a file named hello.rue
:
fn main() -> Bytes {
"Hello, world!"
}
Now, run the following command to run the file:
rue build hello.rue
The output should be (q . "Hello, world!)"
, which when run with CLVM outputs the string on its own.