directory as main.rs?
nah i wanna know how should i treat directories(not libraries) in my rust code
If you haven't already, I'd recommend going through this chapter of the book. https://doc.rust-lang.org/stable/book/ch07-00-managing-growing-projects-with-packages-crates-and-modules.html Should be able to answer your question.
In that case you'd have to add a folder.rs (same name as the directory) with the line: mod tracks And you'd be able to use anything public from tracks.rs in folders.rs. Essentially, you're registering the tracks module as a submodule of the folder module.
Обсуждают сегодня