Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode integration is unexplained. Support of rust-analyzer broken #997

Closed
unreal79 opened this issue May 15, 2022 · 2 comments
Closed

VSCode integration is unexplained. Support of rust-analyzer broken #997

unreal79 opened this issue May 15, 2022 · 2 comments

Comments

@unreal79
Copy link

unreal79 commented May 15, 2022

So, I expected to use rustlings as a no-hassle tool -- it's got 24k stars! Instead I've got a bunch of files with main() in them... rustlings is intended as a Rust newbie helper. Git-cloning is not a problem. Actually editing and running the exercises is.

  1. How should I open files one by one in VSCode? What folder specifically?
  • "rustlings" folder? But I'm immediately getting 100+ problems and not able to compile specific exercise.
  • "exercises" folder? Ok, It's better but what about compiling file I'm currently editing? Luckily VSCode is asking me to autogenerate launch.json after I manually created Cargo.toml file with path = 'variables/variables1.rs' as suggested deep in issues. Am I intended to edit Cargo.toml, delete and autogenerate launch.json every time?.. Very convenient!
  1. Pasting "rust-analyzer.cargo.features": ["exercises"] in .vscode/settings.json gives me error: Value is not accepted. Valid values: "all". Wut?! Was it even tested?.. After setting it to "all", I'm getting errors in "tests" sub-folder -- so I have to rename "test" folder. Now I'm ready to exercise. Every Rust newbie will do the Cargo manipulation easily, right?
@Nicodile
Copy link

Nicodile commented May 15, 2022

as per instructions, Change your directory to rustlings, then run rustlings watch. edit: then edit each file individually.

@shadows-withal
Copy link
Member

We don't support VSCode outside of the rust-analyzer stuff, so things such as creating a run configuration are not in our scope.

Other than that, this part of the README https://github.com/rust-lang/rustlings#doing-exercises explains how to run exercises in the recommended order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants