Problem with installing(windows)

i am only have a problem with commands, i began to learning book and: first C:\Users\2020>rustc --version

rustc 1.44.1 (c7087fe[00 2020-06-17](tel:00 2020-06-17))

C:\Users\2020>rustdoc -version
error: missing file operand

second

C:\Users\2020>ls -la
"ls" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.

third also

cargo run
error: could not find Cargo.toml in C:\Users\2020 or any parent directory

What's wrong,thanks)

Should it be rustdoc --version, as with rustc?

This is expected - ls is the Unix program. On Windows (in Windows command prompt, to be precise) the analog will be dir - use dir /? to learn how it works.

cargo run should be executed from the project root, i.e. the current folder of the command prompt must be the project root. To change the current folder, use cd /path/to/dir (execute D: first, for example, if your project is on drive D).

2 Likes

Thanks, i'll try and reply you, i want also to ask, where i need to write code?) In some shell or where my programs?)

Code is simply stored in text files, so every text editor will be OK. I personally recommend Visual Studio Code with rust-analyzer extension.

Yes, it's ok almost, but now with one more command...dir -l ../target/debug it writes Error in parameter form "rget", why?) I'd like to attach photo,but don't know how)

And also,in cmd i wrote ../target/debug/hello, it reply me no such command as..)

Try using backslashes, not forward slashes, i.e. ..\target\debug\hello. Yes, that's one of the Windows-specific parts.

Please copy the exact lines from console (your input and the output) and format them according to the pinned post, it's hard to understand what's going on. Did you try to use dir /? first to see the built-in help?

Yes, only backslashes needed, sincere gratitude)

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.