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.
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
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?