Although there are some questions related to this but all seems confusing to me.
I have a project with below structure.
When import cli module in main.rs it works properly but when I tried to do same in lib.rs I get below error
= help: name the file either lib/cli.rs or lib/cli/mod.rs inside the directory "src"
but I want to keep it inside cli folder because I will have to add more code in cli folder. why is cargo asking me to create lib folder ?
below is my toml file.
[package]
name = "feline"
version = "0.0.1"
license = "MIT"
authors = ["Akshay Naik <inbox.akshaynaik@gmail.com>"]
edition = "2018"
[dependencies]
smol = { version = "0.1", features = ["tokio02"] }
futures = "0.3.4"
clap = "~2.27.0"
Update: Thea goal is move all logic to lib.rs and call single function from main.rs
Code: