简体   繁体   中英

Is there a way to specify custom main.rs/lib.rs for Rust app development?

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM