Generating this file is now built into rustlings:
rustlings lsp
For more information on how this file works checkout the Rust Analyzer Manual
Generating this file is now built into rustlings:
rustlings lsp
For more information on how this file works checkout the Rust Analyzer Manual
{ | |
"sysroot_src": "/home/jacko/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library", | |
"crates": [ | |
{ | |
"root_module": "exercises/advanced_errors/advanced_errs1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/advanced_errors/advanced_errs2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/clippy/clippy1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/clippy/clippy2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/collections/hashmap1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/collections/hashmap2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/collections/vec1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/collections/vec2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/conversions/as_ref_mut.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/conversions/from_into.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/conversions/from_str.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/conversions/try_from_into.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/conversions/using_as.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/enums/enums1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/enums/enums2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/enums/enums3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/error_handling/errors1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/error_handling/errors2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/error_handling/errors3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/error_handling/errors4.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/error_handling/errors5.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/error_handling/errors6.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/functions/functions1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/functions/functions2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/functions/functions3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/functions/functions4.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/functions/functions5.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/generics/generics1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/generics/generics2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/generics/generics3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/if/if1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/if/if2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/macros/macros1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/macros/macros2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/macros/macros3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/macros/macros4.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/modules/modules1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/modules/modules2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/modules/modules3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/move_semantics/move_semantics1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/move_semantics/move_semantics2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/move_semantics/move_semantics3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/move_semantics/move_semantics4.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/move_semantics/move_semantics5.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/option/option1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/option/option2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/option/option3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/primitive_types/primitive_types1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/primitive_types/primitive_types2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/primitive_types/primitive_types3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/primitive_types/primitive_types4.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/primitive_types/primitive_types5.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/primitive_types/primitive_types6.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/quiz1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/quiz2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/quiz3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/quiz4.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/standard_library_types/arc1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/standard_library_types/box1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/standard_library_types/iterators1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/standard_library_types/iterators2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/standard_library_types/iterators3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/standard_library_types/iterators4.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/standard_library_types/iterators5.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/strings/strings1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/strings/strings2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/structs/structs1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/structs/structs2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/structs/structs3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/tests/tests1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/tests/tests2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/tests/tests3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/threads/threads1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/traits/traits1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/traits/traits2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/variables/variables1.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/variables/variables2.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/variables/variables3.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/variables/variables4.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/variables/variables5.rs", | |
"edition": "2021", | |
"deps": [] | |
}, | |
{ | |
"root_module": "exercises/variables/variables6.rs", | |
"edition": "2021", | |
"deps": [] | |
} | |
] | |
} |
Perfect thank you
worked like a charm!
You are very sexy man
@alex-way haha thanks!
Generating this file is now built into rustlings:
rustlings lsp
I just installed rustlings
last night and this doesn't seem to be true. Have they removed this or has it just not made it in quite yet?
❯ rustlings lsp
Unrecognized argument: lsp
Run rustlings --help for more information.
❯ rustlings --help
Usage: rustlings [--nocapture] [-v] [<command>] [<args>]
Rustlings is a collection of small exercises to get you used to writing and reading Rust code
Options:
--nocapture show outputs from the test exercises
-v, --version show the executable version
--help display usage information
Commands:
verify Verifies all exercises according to the recommended order
watch Reruns `verify` when files were edited
run Runs/Tests a single exercise
hint Returns a hint for the given exercise
list Lists the exercises available in Rustlings
@Zolmok The version you installed must be older, uninstall it.
To get latest follow the commands in https://github.com/rust-lang/rustlings depending on OS:
curl -L https://raw.githubusercontent.com/rust-lang/rustlings/main/install.sh | bash
Open powershell as admin
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Start-BitsTransfer -Source https://raw.githubusercontent.com/rust-lang/rustlings/main/install.ps1 -Destination $env:TMP/install_rustlings.ps1; Unblock-File $env:TMP/install_rustlings.ps1; Invoke-Expression $env:TMP/install_rustlings.ps1
Which should give you:
❯ rustlings -v
v5.4.1
and:
❯ rustlings --help
...
Commands:
verify Verifies all exercises according to the recommended order
watch Reruns `verify` when files were edited
run Runs/Tests a single exercise
reset Resets a single exercise using "git stash -- <filename>"
hint Returns a hint for the given exercise
list Lists the exercises available in Rustlings
lsp Enable rust-analyzer for exercises
Very strange, I thought that's what I did. I did it again though and now I have the later version. One thing I changed is from stable to nightly. I wonder if that is the difference? At any rate I have the lsp version now, tyvm!
@Zolmok no problem happy it works!
Absolute hero. <3
so helpful!
Soo nice!!!!!!!!!!!! Thanks so much for this @jackos 🫶
nice!
I was struggling with this on vscode on windows and this fixed it for me ❤️
Thank you!