crate-module/crate #335
Replies: 9 comments 4 replies
-
完成一个 Package 同时拥有 src/main.rs 和 src/lib.rs ,要怎么cargo new 呢? |
Beta Was this translation helpful? Give feedback.
-
还是不太明白。 我们可以用cargo new 简单地新建一个 package,里面会有一个默认的main.rs,也就是同名的crate。 但是package里面可以包含若干个 crate,那么我如何通过 cargo在这个package里面新建新的 crate 呢? |
Beta Was this translation helpful? Give feedback.
-
lala |
Beta Was this translation helpful? Give feedback.
-
done |
Beta Was this translation helpful? Give feedback.
-
mark finished |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
done |
Beta Was this translation helpful? Give feedback.
-
所以“包名”的用处是什么呢?调用不同模块里那些函数,填地址的时候,注重的是“模块名”吧?这个包名我们有办法在哪里看到,或者在哪里用到吗? |
Beta Was this translation helpful? Give feedback.
-
done. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
crate-module/crate
Learning Rust By Practice, narrowing the gap between beginner and skilled-dev with challenging examples, exercises and projects.
https://zh.practice.rs/crate-module/crate.html
Beta Was this translation helpful? Give feedback.
All reactions