So I'm currently learning the Rust language on the official website and I'm in the middle of Chapter 12 where they want me to split some of my code from src/main.rs
to src/lib.rs
. At first I created a library crate named "minigrep" inside the binary crate:
- minigrep
- src
- main.rs
but Rust couldn't find it. Next I tried moving it inside the src directory:
- src
- minigrep
- main.rs
Any help as to how Rust can detect an external crate?