Perhaps use foo.rs/bar.rs instead of the default main/lib package root file?
How to config it?
For a library, set [lib].path
:
[lib]
path = "src/bar.rs"
For a binary, set [[bin]].path
:
[[bin]]
name = "foo"
path = "src/foo.rs"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.