Skip to content

Instantly share code, notes, and snippets.

@allolex
Last active November 12, 2023 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allolex/6705f3802dfb3a0032f167833d49aa2a to your computer and use it in GitHub Desktop.
Save allolex/6705f3802dfb3a0032f167833d49aa2a to your computer and use it in GitHub Desktop.
asdf, rust, and the JetBrains CLion IDE

asdf, rust, and JetBrains CLion IDE.

JetBrains has a new Rust IDE, but I don't want to pay for the license, so I am using a fallback version of CLion. That means my IDE is vintage 2022.

  1. Install rust using asdf in the usual way.
    • asdf install rust latest
    • That's currently 1.7.3 for me right now.
  2. After you have done that, set .tool-versions with that version:
    • asdf local rust latest
  3. Install the rust standard library:
    • rustup component-add rust-src
  4. Download the appropriate version of the deprecated rust plugin:
  5. Scroll down until you find the latest version of the plugin that will work with your IDE.
    • Mine was the last one of 2022.
    • When I downloaded the plugin in Safari, for some reason it decided to decompress the plugin .zip file.
    • Download the plugin in Chrome to avoid this since JetBrains looks at the filename for the version information.
  6. Follow JetBrains' documentation to install the plugin.
  7. Go to the plugin configuration dialog and enter the appropriate locations for your version of rust. “~” below will need to be expanded to the path of your home folder.
    • Toolchain location: ~/.asdf/installs/rust/1.73.0/toolchains/1.73.0-aarch64-apple-darwin/bin
    • Standard library: ~/.asdf/installs/rust/1.73.0/toolchains/1.73.0-aarch64-apple-darwin/lib/rustlib/src/rust/library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment