Installation

RustScript requires a working Rust toolchain. If you don't have Rust installed, get it from rustup.rs.

Install via Cargo

The recommended way to install the RustScript compiler:

cargo install rustscript

rsc is also available as a short alias for rustscript.

Verify the installation

rustscript --version

Create a new project

rustscript init my-app
cd my-app

This creates a new directory with a rustscript.json manifest, a generated Cargo.toml, .gitignore, and src/main.rts entry point.

Run your project

rustscript run

RustScript will compile your .rts files to Rust, build the project with Cargo, and run the resulting binary.

Editor support

RustScript includes a language server for editor integration:

  • VS Code: Install the RustScript extension from the marketplace.
  • Neovim: Configure rustscript lsp as an LSP server for .rts files.

Next steps

  • Read the language guide to learn RustScript syntax
  • Try the playground to experiment in the browser
  • Browse the crate documentation for ecosystem integration