Cargo
main.rs lib.rs other.rs another.rs
-lib.rs
pub mod other;
pub mod another;
-main.rs
// Cargo.toml name="xxx"
use xxx::{...*...};
other.rs
//if use another.rs
use super::another...
about test
/tests/*.rs
use xxx::...
The lib.rs
and main.rs
files are two independent entry points for your package.
1
共 1 条评论, 1 页
评论区
写评论言简意赅,茅塞顿开