Cargorust包管理器。用戶可以通過Cargo下載、管理rust程序中的依賴項。

Cargo由rust官方創建和維護,和rust一起被安裝。

Cargo命令 編輯

命令 功能 參數
help(h) 獲取命令幫助 命令
new 創建新倉庫 倉庫名
init 在當前目錄創建倉庫
build(b) 編譯源代碼
run(r) 編譯源代碼並運行
check(c) 分析源代碼但不編譯
clean 清除編譯結果
doc(d) 自動創建文檔
add 添加依賴項 包名
remove 刪除依賴性 包名
update 更新所有依賴性
search 搜索包 包名
test(t) 測試