Since I have to focus on more realistic things in life to stay afload, I do not have time to keep this updated with the ever changing IDE API (it's a LOT of work). So unfortunately I've had to discontinue development for this. The last IDE version this will work on is likely 2021 edition.
You are welcome to take all of this source code and use it/modify it freely. Just please credit me, and also, I would love to know about/see your project that utilizes it!
An IntelliJ plugin offering a powerful local Rust playground, straight from your IDE! Inspired by the official Rust playground, but more convenient to use!
- Complete integration with official IntelliJ Rust plugin
- Run playground-like scripts directly from your IDE without having to setup any projects
- Supports naming build-dependencies, different toolchains, and all
cargo-play
functions from the toolbar above your scratch file - Ability to change the Rust default scratch file template to your own
- Open Cargo Play folder from right click menu
- Can be run in non-Cargo projects!
- Make or open a cargo project
- Open a Rust scratch file and go to
Run -> Run in Playground
to execute in Playground, or use the toolbar play button ctrl+alt+comma
can also be used as a shortcut
- Open a Rust scratch file and go to
This is part of cargo-play itself. This is used to add build-dependencies. It accepts any valid Cargo-TOML syntax. Please see cargo-play docs for more info.
Example //# serde_json = "*"
- Official Rust Plugin
- Cargo cargo-play subcommand (it will prompt to install it automatically)
- Cargo cargo-expand subcommand (for --expand function)
- IntelliJ 2021.3
Check out cargo-play for complete non-plugin usage
Please contribute to the latest stable branch major.minor.x
instead of master (e.g. if the latest stable release is 2.1.4
, check for a branch 2.1.x
and contribute to that one). Master is currently very experimental and will likely fail compiling, and may even be out of date in respect to the stable branch.