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
rscis also available as a short alias forrustscript.
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 lspas an LSP server for.rtsfiles.
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