Say for a library crate, under src/ I have 3 files: lib.rs
, a.rs
, b.rs
.
I write a function f()
in b.rs
. How can I call it in file a.rs
?
If I write mod b;
in a.rs
, the compiler will find it under directory src/a/. But this is not what I want. For example, I may have cyclic dependency.