Closed
Description
Problem
I've tried to create new project inside project which was previously created by cargo init and removed. Now when I want to create new project inside, I've got an error that there is a missing Cargo.toml in parent directory, but parent directory doesn't need to have Cargo.toml because it should be simple directory contains all rust projects.
Steps:
- Create directory e.g. "/home/ubuntu/Projects/Rust/"
- Go inside this directory and type
cargo init
- Change mind and remove all files
rm -r *
- Create new project inside this directory e.g.
cargo new test_rust_wsl
- New directory is created "/home/ubuntu/Projects/Rust/test_rust_wsl"
- Go inside new directory and try build
cargo build
Get the error:
error: failed to load manifest for workspace member /home/ubuntu/Projects/Rust
Caused by:
failed to read /home/ubuntu/Projects/Rust/Cargo.tomlCaused by:
No such file or directory (os error 2)
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
cargo 1.75.0 (1d8b05cdd 2023-11-20)
release: 1.75.0
commit-hash: 1d8b05cdd1287c64467306cf3ca2c8ac60c11eb0
commit-date: 2023-11-20
host: x86_64-unknown-linux-gnu
libgit2: 1.7.1 (sys:0.18.1 vendored)
libcurl: 8.4.0-DEV (sys:0.4.68+curl-8.4.0 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u 30 May 2023
os: Ubuntu 22.04 (jammy) [64-bit]