- Rust Programming By Example
- Guillaume Gomez Antoni Boucher
- 248字
- 2021-07-02 19:13:03
Cargo and crates.io
A very important thing to note with Rust's ecosystem is that Cargo is really important if not central. It makes things much easier and all Rust projects are using it.
Cargo isn't only a build tool, it's also Rust's default package manager. If you need to download a dependency, Cargo will do it. You can find all available published crates on https://crates.io/. Consider the following screenshot:

Figure 2.1
In the case of the sdl2 crate, we can see on its page (https://crates.io/crates/sdl2) some interesting and useful information:

Figure 2.2
On the right-hand side, you can see the version history. It can be useful to check whether you have the last version or not and whether the crate is still maintained.
In the middle, you have the crate's dependencies. It's always interesting to know what you'll need to install in addition to your crate if something is missing.
And finally on the left-hand side, you have a few links that might be very useful (not always those ones, it depends on what has been put into the Cargo.toml file):
- Documentation: This is where the documentation is hosted (even though I generally recommend docs.rs, I'll talk about it in a moment)
- Repository: This is where this crate's repository is hosted
- Dependent crates: This is the list of the crates depending on this one
- Homepage: If the crate has a website, you can go to its link
Time to go back to docs.rs for a bit.
- 普通高校中文學科基礎教材古典文獻學基礎
- 區(qū)塊鏈在電子檔案管理中的應用
- 國外圖書館動漫資源建設與服務
- Learning Robotics using Python
- 信息系統(tǒng)工程(第2版)
- 海源閣史
- 信息資源的公共獲取機制研究
- Swift Game Development(Third Edition)
- 還是那座故宮(精裝版)
- 大學圖書館信息服務與信息素養(yǎng)教育理論與實踐研究
- 高校圖書館休閑功能開發(fā)研究
- 縱心所欲:徜徉于稀見與常見書之間
- 數(shù)字資源存儲、倉儲和發(fā)布的標準規(guī)范建設
- 中國富布賴特學友會(籌)論文集(2013)
- 兒童閱讀的世界Ⅳ:學校、家庭與社區(qū)的實踐研究