Sorry for the rudimentary question.
When I run cargo run
I get the following output.
⯠cargo run
error: `cargo run` could not determine which binary to run. Use the `--bin` option to specify a binary, or the `default-run` manifest key.
Available binaries: async_await_basic, asynchronous, thread_and_async
I am instructed to specify the bin directory, but I want to run src/main.rs
, so I investigated if the module structure is bad, but there is no module conflict.
Directory structure
perfect-rust/practice_collection/thread_and_async on ī develop [!?] via š¦ v1.72.0
ā tree
.
āāā Cargo.toml
README.md
āāā src
āāā basic.rs
āāā bin
ā āāā async_await_basic.rs
ā āā asynchronous.rs
āā cross_beam.rs
āāā exclusive_mutex.rs
āāā exclusive_rwlock.rs
āāā exclusive_shradelock.rs
āāā lib.rs
āāā main.rs
āā messaging_crossbeam.rs
āā messaging_std.rs
āā task
āā client.rs
āāā customer.rs
āāā mod.rs
āā task_controller.rs
āā writer.rs
If I set the default-run
key in the Cargo.toml
file to thread_and_sync
, the cargo run
works as expected.
I just don't understand why I have to set default-run to the above.
I am sorry, but could you please enlighten me on this point?